By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,404 Members | 2,512 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,404 IT Pros & Developers. It's quick & easy.

PHP pre-defined error displaying

P: 41
I have created a form on my website but for some reason 3 sections of the form arenot submitting correctly. After clicking submit I recieve this on screen:
'We are very sorry, but there were error(s) found with the form you submitted. These errors appear below.

The RAID you entered do not appear to be valid.
The Accessories you entered do not appear to be valid.
The Guarantee you entered do not appear to be valid.


Please go back and fix these errors.'

This is the PHP for the form:
Expand|Select|Wrap|Line Numbers
  1. if(isset($_POST['email'])) {
  2.  
  3.     $email_to = "matt.email@gmail.com";
  4.  
  5.     $email_subject = "Custom Form";
  6.  
  7.  
  8.     function died($error) {
  9.         echo "We are very sorry, but there were error(s) found with the form you submitted. ";
  10.         echo "These errors appear below.<br /><br />";
  11.         echo $error."<br /><br />";
  12.         echo "Please go back and fix these errors.<br /><br />";
  13.         die();
  14.     }
  15.     if(!isset($_POST['first_name']) ||
  16.        !isset($_POST['last_name']) ||
  17.        !isset($_POST['email']) ||
  18.        !isset($_POST['role']) ||
  19.        !isset($_POST['ram']) ||
  20.        !isset($_POST['raid']) ||
  21.        !isset($_POST['hdd1']) ||
  22.        !isset($_POST['hdd2']) ||
  23.        !isset($_POST['os']) ||
  24.        !isset($_POST['gpu']) ||
  25.        !isset($_POST['extras']) ||
  26.        !isset($_POST['accessories']) ||
  27.        !isset($_POST['guarantee']) ||
  28.        !isset($_POST['customer']) ||
  29.        !isset($_POST['budget'])) {    
  30.     }
  31.  
  32.     $first_name = $_POST['first_name']; 
  33.     $last_name = $_POST['last_name']; 
  34.     $email_from = $_POST['email']; 
  35.     $Role = $_POST['role']; 
  36.     $Memory_Size = $_POST['ram'];
  37.     $RAID = $_POST['raid']; 
  38.     $Hard_Drive_1 = $_POST['hdd1']; 
  39.     $Hard_Drive_2 = $_POST['hdd2']; 
  40.     $Operating_System = $_POST['os'];
  41.     $Graphics_Card = $_POST['gpu']; 
  42.     $Optional_Extras = $_POST['extras']; 
  43.     $Accessory_Packs = $_POST['accessories'];
  44.     $Guarantee = $_POST['guarantee']; 
  45.     $Customer_Specifics = $_POST['customer']; 
  46.     $Maximum_Budget = $_POST['budget']; 
  47.  
  48.     $error_message = "";
  49.     $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  50.   if(!preg_match($email_exp,$email_from)) {
  51.     $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
  52.   }
  53.     $string_exp = "/^[A-Za-z .'-]+$/";
  54.   if(!preg_match($string_exp,$first_name)) {
  55.     $error_message .= 'The First Name you entered does not appear to be valid.<br />';
  56.   }
  57.   if(!preg_match($string_exp,$last_name)) {
  58.     $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
  59.   }
  60.   if(strlen($Role) < 2) {
  61.     $error_message .= 'The Role you entered do not appear to be valid.<br />';
  62.   }
  63.   if(strlen($Memory_Size) < 2) {
  64.     $error_message .= 'The RAM you entered do not appear to be valid.<br />';
  65.   }
  66.   if(strlen($RAID) < 2) {
  67.     $error_message .= 'The RAID you entered do not appear to be valid.<br />';   
  68.   }
  69.   if(strlen($Hard_Drive_1) < 2) {
  70.     $error_message .= 'The HHD1 you entered do not appear to be valid.<br />';
  71.   }
  72.   if(strlen($Hard_Drive_2) < 2) {
  73.     $error_message .= 'The HDD2 you entered do not appear to be valid.<br />';
  74.   }
  75.   if(strlen($Operating_System) < 2) {
  76.     $error_message .= 'The OS you entered do not appear to be valid.<br />';
  77.   }
  78.   if(strlen($Graphics_Card) < 2) {
  79.     $error_message .= 'The GPU you entered do not appear to be valid.<br />';
  80.   }
  81.   if(strlen($Optional_Extras) < 2) {
  82.     $error_message .= 'The Extras you entered do not appear to be valid.<br />';
  83.   }
  84.   if(strlen($Accessory_Packs) < 2) {
  85.     $error_message .= 'The Accessories you entered do not appear to be valid.<br />';   
  86.   }
  87.   if(strlen($Guarantee) < 2) {
  88.     $error_message .= 'The Guarantee you entered do not appear to be valid.<br />';
  89.   }
  90.   if(strlen($Customer_Specifics) < 2) {
  91.     $error_message .= 'The Customer Specifics you entered do not appear to be valid.<br />';   
  92.   }
  93.   if(strlen($Maximum_Budget) < 2) {
  94.     $error_message .= 'The Maximum Budget you entered do not appear to be valid.<br />';   
  95.   }
  96.   if(strlen($error_message) > 0) {
  97.     died($error_message);
  98.   }
  99.     $email_message = "Form details below.\n\n";
  100.  
  101.     function clean_string($string) {
  102.       $bad = array("content-type","bcc:","to:","cc:","href");
  103.       return str_replace($bad,"",$string);
  104.     }
  105.  
  106.     $email_message .= "First Name: ".clean_string($first_name)."\n";
  107.     $email_message .= "Last Name: ".clean_string($last_name)."\n";
  108.     $email_message .= "Email: ".clean_string($email_from)."\n";
  109.     $email_message .= "Role: ".clean_string($Role)."\n";
  110.     $email_message .= "Memory Size: ".clean_string($Memory_Size)."\n";
  111.     $email_message .= "RAID: ".clean_string($RAID)."\n";
  112.     $email_message .= "Hard Drive 1: ".clean_string($Hard_Drive_1)."\n";
  113.     $email_message .= "Hard Drive 2: ".clean_string($Hard_Drive_2)."\n";
  114.     $email_message .= "Operating System: ".clean_string($Operating_System)."\n";
  115.     $email_message .= "Graphics Card: ".clean_string($Graphics_Card)."\n";
  116.     $email_message .= "Optional Extras: ".clean_string($Optional_Extras)."\n";
  117.     $email_message .= "Accessory Packs: ".clean_string($Accessory_Packs)."\n";
  118.     $email_message .= "Guarantee: ".clean_string($Guarantee)."\n";
  119.     $email_message .= "Customer Specifics: ".clean_string($Customer_Specifics)."\n";
  120.     $email_message .= "Maximum Budget: ".clean_string($Maximum_Budget)."\n";
  121.  
  122. // create email headers
  123. $headers = 'From: '.$email_from."\r\n".
  124. 'Reply-To: '.$email_from."\r\n" .
  125. 'X-Mailer: PHP/' . phpversion();
  126. @mail($email_to, $email_subject, $email_message, $headers); 
  127. ?>
  128.  
  129.  
  130. Thank you for requesting a quote.
  131.  
  132. <?php
  133. }
  134. die();
  135. ?>
  136.  
  137. <body>
  138. </body>
  139. </html>
  140.  
  141.  
I was getting the error for every field entered but seems to just be the three now.
Nov 1 '11 #1

✓ answered by Matt Morgan

So what are you suggesting I do?
I know I have to change this:
Expand|Select|Wrap|Line Numbers
  1.     if(strlen($RAID) < raid (4) Y (1), N (1)) {
  2.         $error_message .= 'The RAID you entered do not appear to be valid.<br />';   
  3.       }
  4.  
  5.  
for the respective parts which are not working, I just don't know what to.

Share this Question
Share on Google+
55 Replies


Dormilich
Expert Mod 5K+
P: 8,639
can you print out the invalid values?
Nov 1 '11 #2

P: 41
This is the PHP sections for the RAID field, as well as the relevant HTML.
Expand|Select|Wrap|Line Numbers
  1.     !isset($_POST['raid']) ||
  2.  
  3.     $RAID = $_POST['raid'];
  4.  
  5.     if(strlen($RAID) < 2) {
  6.         $error_message .= 'The RAID you entered do not appear to be valid.<br />';   
  7.       }
  8.  
  9.     $email_message3 .= "RAID: ".clean_string($RAID)."\n";
  10.  
  11.     <tr>
  12.                     <td align="left" valign="top">
  13.                       <label for="raid">RAID </label>                 </td>
  14.                      <td align="left" valign="top">
  15.                       <select name="raid">
  16.                         <option value="raid"> </option>
  17.                         <option value="Y">Yes*</option>
  18.                         <option value="N">No</option>
  19.                       </select>
  20.                       <span class="style8">(*Requires 2 identical Hard Drives)</span></td>
  21.                     </tr>
  22.  
  23.  
  24.  
The Accessories Field:
Expand|Select|Wrap|Line Numbers
  1.     !isset($_POST['accessories']) ||
  2.  
  3.     $Accessory_Packs = $_POST['accessories'];
  4.  
  5.     if(strlen($Accessory_Packs) < 2) {
  6.         $error_message .= 'The Accessories you entered do not appear to be valid.<br />';   
  7.       }
  8.  
  9.     $email_message9 .= "Accessory Packs: ".clean_string($Accessory_Packs)."\n";
  10.  
  11.     <tr>
  12.                     <td align="left" valign="top">
  13.                       <label for="accessories">Accessory Packs [2]</label>                 </td>
  14.                     <td align="left" valign="top">
  15.                      <input type="checkbox" name="accessories" value="0" checked="checked"/> 
  16.                       None <br />
  17.                       <input type="checkbox" name="accessories" value="1" /> 
  18.                       Pack 1  <br />
  19.                       <input type="checkbox" name="accessories" value="2" /> 
  20.                       Pack 2 <br />
  21.                       <input type="checkbox" name="accessories" value="3" /> 
  22.                       Pack 3 <br />
  23.                       <input type="checkbox" name="accessories" value="4" /> 
  24.                       Pack 4 <br />
  25.                       <input type="checkbox" name="accessories" value="5" /> 
  26.                       Pack 5 <br />
  27.                       <input type="checkbox" name="accessories" value="6" /> 
  28.                       Pack 6 <br />
  29.                       <input type="checkbox" name="accessories" value="Other" /> 
  30.                       Other (Please Specify) <br />                  </select>                  </td>
  31.                     </tr>
  32.  
  33.  
  34.  
The Guarantee Field:
Expand|Select|Wrap|Line Numbers
  1.     !isset($_POST['guarantee']) ||
  2.  
  3.     $Guarantee = $_POST['guarantee'];
  4.  
  5.     if(strlen($Guarantee) < 2) {
  6.         $error_message .= 'The Guarantee you entered do not appear to be valid.<br />';
  7.       }
  8.  
  9.     $email_message10 .= "Guarantee: ".clean_string($Guarantee)."\n";
  10.  
  11.     <tr>
  12.                     <td align="left" valign="top">
  13.                       <label for="guarantee">Guarantee </label>                 </td>
  14.                      <td align="left" valign="top">
  15.                       <select name="guarantee">
  16.                     <option value="guarantee"> </option>
  17.                     <option value="0">No Extension</option>
  18.                     <option value="1">1 Year Extension</option>
  19.                     <option value="2">2 Year Extension</option>
  20.                     </select></td>
  21.                     </tr>
  22.  
  23.  
  24.  
Nov 1 '11 #3

Dormilich
Expert Mod 5K+
P: 8,639
in pretty much every case, you mark valid answers as invalid.
Raid:
- values (strlen): raid (4), Y (1), N (1)
Accessories:
- values (strlen): 0 (1), 1 (1), … , 6 (1), Other (5)
Guarantee:
- values (strlen): guarantee (9), 0 (1), 1 (1), 2 (1)
Nov 2 '11 #4

P: 41
So how do I get around this. I only understand basic PHP so I'm not very good at it.
Nov 2 '11 #5

Dormilich
Expert Mod 5K+
P: 8,639
change the condition for a failure.

example: you expect only integers to be given ($_POST['myint'])
Expand|Select|Wrap|Line Numbers
  1. $value = filter_input(INPUT_POST, "myint", FILTER_VALIDATE_INT);
  2. if (false === $value)
  3. {
  4.     // myint is not an integer
  5. }
Nov 2 '11 #6

P: 41
Hi, I've attempted some changes to the values on the PHP however it appears to have made things worse!

I now recieve these error messages:
We are very sorry, but there were error(s) found with the form you submitted. These errors appear below.

The RAID you entered do not appear to be valid.
The Accessories you entered do not appear to be valid.
The Guarantee you entered do not appear to be valid.
The Maximum Budget you entered do not appear to be valid.


Please go back and fix these errors.


This is the code for the error messages:
Expand|Select|Wrap|Line Numbers
  1.     $error_message = "";
  2.     $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  3.   if(!preg_match($email_exp,$email_from)) {
  4.     $error_message .= 'The Email Address you entered does not appear to be valid.<br />';
  5.   }
  6.     $string_exp = "/^[A-Za-z .'-]+$/";
  7.   if(!preg_match($string_exp,$first_name)) {
  8.     $error_message .= 'The First Name you entered does not appear to be valid.<br />';
  9.   }
  10.   if(!preg_match($string_exp,$last_name)) {
  11.     $error_message .= 'The Last Name you entered does not appear to be valid.<br />';
  12.   }
  13.   if(strlen($Role) < 2) {
  14.     $error_message .= 'The Role you entered do not appear to be valid.<br />';
  15.   }
  16.   if(strlen($Memory_Size) < 2) {
  17.     $error_message .= 'The RAM you entered do not appear to be valid.<br />';
  18.   }
  19.   if(strlen($RAID) < 2) {
  20.     $error_message .= 'The RAID you entered do not appear to be valid.<br />';   
  21.   }
  22.   if(strlen($Hard_Drive_1) < 2) {
  23.     $error_message .= 'The HHD1 you entered do not appear to be valid.<br />';
  24.   }
  25.   if(strlen($Hard_Drive_2) < 2) {
  26.     $error_message .= 'The HDD2 you entered do not appear to be valid.<br />';
  27.   }
  28.   if(strlen($Operating_System) < 2) {
  29.     $error_message .= 'The OS you entered do not appear to be valid.<br />';
  30.   }
  31.   if(strlen($Graphics_Card) < 2) {
  32.     $error_message .= 'The GPU you entered do not appear to be valid.<br />';
  33.   }
  34.   if(strlen($Optional_Extras) < 2) {
  35.     $error_message .= 'The Extras you entered do not appear to be valid.<br />';
  36.   }
  37.   if(strlen($Accessory_Packs) < 2) {
  38.     $error_message .= 'The Accessories you entered do not appear to be valid.<br />';   
  39.   }
  40.   if(strlen($Guarantee) < 2) {
  41.     $error_message .= 'The Guarantee you entered do not appear to be valid.<br />';
  42.   }
  43.     $string_exp = "/^[A-Za-z .'-]+$/";
  44.   if(!preg_match($string_exp,$Customer_Specifics)) {
  45.     $error_message .= 'The Customer Specifics you entered do not appear to be valid.<br />';   
  46.   }
  47.     $string_exp = "/^[A-Za-z .'-]+$/";
  48.   if(!preg_match($string_exp,$Maximum_Budget)) {
  49.     $error_message .= 'The Maximum Budget you entered do not appear to be valid.<br />';   
  50.   }
  51.   if(strlen($error_message) > 0) {
  52.     died($error_message);
  53.   }
  54.  
I assume it's this ' if(strlen($Guarantee) < 2) {' that needs to be changed for the ones flagging as Errors. What should they be changed to?
Nov 5 '11 #7

Expert Mod 2.5K+
P: 2,545
This thread follows on from a previous thread: http://bytes.com/topic/php/answers/9...ror-unexpected

-Stewart
Nov 5 '11 #8

P: 41
Im assuming that it's this section ' if(strlen($Guarantee) < 2) {' that needs to be changed for the ones flagging as Errors (RAID, Accessories, Guarantee). What would you suggest setting them as?
Nov 8 '11 #9

Dormilich
Expert Mod 5K+
P: 8,639
What would you suggest setting them as?
what values do you expect (do you have given in the HTML)?

if you set numbers, check for a number (e.g. post #6), if you set strings, check if the received string matches one of the valid strings.
Nov 8 '11 #10

P: 41
RAID HTML is
Expand|Select|Wrap|Line Numbers
  1. <tr>
  2.                 <td align="left" valign="top">
  3.                   <label for="raid">RAID </label>                 </td>
  4.                  <td align="left" valign="top">
  5.                   <select name="raid">
  6.                     <option value="raid" selected="selected"> </option>
  7.                     <option value="Y">Yes*</option>
  8.                     <option value="N">No</option>
  9.                   </select>
  10.                   <span class="style8">(*Requires 2 identical Hard Drives)</span></td>
  11.                 </tr>
Accessories HTML is
Expand|Select|Wrap|Line Numbers
  1. <tr>
  2.                 <td align="left" valign="top">
  3.                   <label for="accessories">Accessory Packs [2]</label>                 </td>
  4.                 <td align="left" valign="top">
  5.                  <input type="checkbox" name="accessories" value="0" checked="checked"/> 
  6.                   None <br />
  7.                   <input type="checkbox" name="accessories" value="1" /> 
  8.                   Pack 1  <br />
  9.                   <input type="checkbox" name="accessories" value="2" /> 
  10.                   Pack 2 <br />
  11.                   <input type="checkbox" name="accessories" value="3" /> 
  12.                   Pack 3 <br />
  13.                   <input type="checkbox" name="accessories" value="4" /> 
  14.                   Pack 4 <br />
  15.                   <input type="checkbox" name="accessories" value="5" /> 
  16.                   Pack 5 <br />
  17.                   <input type="checkbox" name="accessories" value="6" /> 
  18.                   Pack 6 <br />
  19.                   <input type="checkbox" name="accessories" value="Other" /> 
  20.                   Other (Please Specify) <br />                  </select>                  </td>
  21.                 </tr>
Guarantee HTML is:
Expand|Select|Wrap|Line Numbers
  1. <tr>
  2.                 <td align="left" valign="top">
  3.                   <label for="guarantee">Guarantee </label>                 </td>
  4.                  <td align="left" valign="top">
  5.                   <select name="guarantee">
  6.                 <option value="guarantee" selected="selected"> </option>
  7.                 <option value="0">No Extension</option>
  8.                 <option value="1">1 Year Extension</option>
  9.                 <option value="2">2 Year Extension</option>
  10.                 </select></td>
  11.                 </tr>
Nov 8 '11 #11

Dormilich
Expert Mod 5K+
P: 8,639
I think (hope) with that you can answer the question what values you expect for each field.
Nov 8 '11 #12

P: 41
Honestly have no idea. I've only recently started using PHP.
Nov 8 '11 #13

Dormilich
Expert Mod 5K+
P: 8,639
this has nothing to do with PHP. this is pure HTML (at this point):

what are the possible values for the guarantee field?
Nov 8 '11 #14

P: 41
guarantee, 0, 1, 2. So 4 values?
Nov 8 '11 #15

Dormilich
Expert Mod 5K+
P: 8,639
4 possible values, of which one will be (regularly) submitted.

what does the value "guarantee" stand for?
Nov 8 '11 #16

P: 41
a 'tab' space, so appearance is blank on the form.
Nov 8 '11 #17

P: 41
I changed Guarantee to
Expand|Select|Wrap|Line Numbers
  1. if(strlen($Guarantee) < 4) {
  2.     $error_message .= 'The Guarantee you entered do not appear to be valid.<br />';
  3.   }
but still recieve an error when submitting the form.

Also attempted this with RAID:
Expand|Select|Wrap|Line Numbers
  1. if(strlen($RAID) < 3) Y (1), N (2)) {
  2.     $error_message .= 'The RAID you entered do not appear to be valid.<br />';   
  3.   }
but instead recieve a Parse Error: Parse error: syntax error, unexpected ',' in /www/zymichost.com/m/y/c/mycustombuiltpc/htdocs/CustomForm.php on line 75
Nov 8 '11 #18

Dormilich
Expert Mod 5K+
P: 8,639
of course. there are 3 valid values with a string length < 4 (the numbers). does the "guarantee" value bear any meaning (to the script)? if not, it can be regarded as invalid value and then you only have the numbers left, for which I already showed you a way to verify them.
Nov 8 '11 #19

P: 41
I have now tried it as you suggested, Raid:
- values (strlen): raid (4), Y (1), N (1)
as
Expand|Select|Wrap|Line Numbers
  1. if(strlen($RAID) < raid (4) Y (1), N (1)) {
  2.     $error_message .= 'The RAID you entered do not appear to be valid.<br />';   
  3.   }
But still get the Parse Error.


Guarantee " " will never be selected, so will never be a chosen value.
Nov 8 '11 #20

Dormilich
Expert Mod 5K+
P: 8,639
I have now tried it as you suggested, Raid:
- values (strlen): raid (4), Y (1), N (1)
that wasn’t a suggestion, just what strlen() on that values would produce.


Guarantee " " will never be selected, so will never be a chosen value.
that leaves you with the numbers. and I already showed you how to validate numbers. (but you are aware that " " won’t be passed, ain’t you?)
Nov 8 '11 #21

P: 41
So I would just need to put
Expand|Select|Wrap|Line Numbers
  1. if(strlen($Guarantee) < (3) {
Nov 8 '11 #22

Dormilich
Expert Mod 5K+
P: 8,639
do you know what the strlen() function does?
Nov 8 '11 #23

P: 41
I believed it is for a string, I'm assuming I'm wrong?
Nov 8 '11 #24

Dormilich
Expert Mod 5K+
P: 8,639
yea, but what does it actually do?
Nov 9 '11 #25

P: 41
Returns the length of the string?
Nov 9 '11 #26

Dormilich
Expert Mod 5K+
P: 8,639
correct.

does that functionality (returning the string length) help you validating the input?
Nov 9 '11 #27

P: 41
I'm guessing not as it isn't working.
Nov 9 '11 #28

Dormilich
Expert Mod 5K+
P: 8,639
disregarding PHP, describe in words how you you would determine, when the input of the guarantee field is valid.
Nov 9 '11 #29

P: 41
It's a drop down menu, so whenever one of the 3 options are selected, 4 fields, "[blank]", none, 1 yr extension, 2 yr extension
Nov 9 '11 #30

Dormilich
Expert Mod 5K+
P: 8,639
none, 1 yr extension, 2 yr extension
now we have the meaning (intention) of the choosable options, but what are the values sent to the server script?
Nov 9 '11 #31

P: 41
Not really sure, assuming a number(s)?
Nov 9 '11 #32

Dormilich
Expert Mod 5K+
P: 8,639
and how would you check if something is a number?


edit: hey, this is my 6,000th post!
Nov 9 '11 #33

P: 41
Another guess = $number?
Nov 9 '11 #34

Dormilich
Expert Mod 5K+
P: 8,639
? ? ?
Nov 9 '11 #35

P: 41
I'm not really sure. Error messages shouldn't have '$strlen' is about as far as I'm following, although it's sending numbers, but it shouldn't.
Nov 9 '11 #36

zorgi
Expert 100+
P: 431
@Dormilich
Hey Dormilich congratulations on your 6000
Nov 9 '11 #37

Dormilich
Expert Mod 5K+
P: 8,639
why shouldn’t it send numbers?
Nov 10 '11 #38

P: 41
so it's sending numbers as representations of:
none, 1 yr extension, 2 yr extension?
Nov 10 '11 #39

Dormilich
Expert Mod 5K+
P: 8,639
you wrote the HTML, didn’t you?
Nov 11 '11 #40

P: 41
Yes,I know how to write it, just don't understand how it then relates to the functions in PHP.
Nov 11 '11 #41

Dormilich
Expert Mod 5K+
P: 8,639
your input does not relate to PHP functions (unless I misinterpret the term "relate"). what you have is input (either from $_GET or $_POST […]) and you need to validate these strings by means of PHP function. which function(s) to choose for that purpose depends on what the input is supposed to be. e.g. strlen() gives you the length of the string, if that is a statement you can work with depends on your validation strategy.
Nov 11 '11 #42

P: 41
so you're suggesting not having POST and having GET instead?
Nov 12 '11 #43

Dormilich
Expert Mod 5K+
P: 8,639
it doesn’t matter whether it is $_POST or $_GET, the validation required is the same.
Nov 12 '11 #44

P: 41
So if that is all fine, then it is purely the second half of the error messages causing the problems, but I don't know/ understand what to change these to.
Nov 13 '11 #45

Dormilich
Expert Mod 5K+
P: 8,639
what was the message again?
Nov 14 '11 #46

P: 41
We are very sorry, but there were error(s) found with the form you submitted. These errors appear below.

The RAID you entered do not appear to be valid.
The Accessories you entered do not appear to be valid.
The Guarantee you entered do not appear to be valid.

Please go back and fix these errors.
Nov 14 '11 #47

Dormilich
Expert Mod 5K+
P: 8,639
I thought it were a PHP error message. nevertheless, the problem is your validation strategy. the last time we were at "how would you check that a variable is an integer?" any ideas?
Nov 15 '11 #48

P: 41
They are predefined error messages on the PHP which, when an error occurs, display on the screen. I honestly have no idea.
Nov 15 '11 #49

Dormilich
Expert Mod 5K+
P: 8,639
you have no idea what the difference between 1 and "q" is?
Nov 15 '11 #50

55 Replies

Post your reply

Sign in to post your reply or Sign up for a free account.