473,414 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

PHP pre-defined error displaying

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.

55 4504
Dormilich
8,658 Expert Mod 8TB
can you print out the invalid values?
Nov 1 '11 #2
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
8,658 Expert Mod 8TB
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
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
8,658 Expert Mod 8TB
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
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
Stewart Ross
2,545 Expert Mod 2GB
This thread follows on from a previous thread: http://bytes.com/topic/php/answers/9...ror-unexpected

-Stewart
Nov 5 '11 #8
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
8,658 Expert Mod 8TB
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
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
8,658 Expert Mod 8TB
I think (hope) with that you can answer the question what values you expect for each field.
Nov 8 '11 #12
Honestly have no idea. I've only recently started using PHP.
Nov 8 '11 #13
Dormilich
8,658 Expert Mod 8TB
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
guarantee, 0, 1, 2. So 4 values?
Nov 8 '11 #15
Dormilich
8,658 Expert Mod 8TB
4 possible values, of which one will be (regularly) submitted.

what does the value "guarantee" stand for?
Nov 8 '11 #16
a 'tab' space, so appearance is blank on the form.
Nov 8 '11 #17
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
8,658 Expert Mod 8TB
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
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
8,658 Expert Mod 8TB
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
So I would just need to put
Expand|Select|Wrap|Line Numbers
  1. if(strlen($Guarantee) < (3) {
Nov 8 '11 #22
Dormilich
8,658 Expert Mod 8TB
do you know what the strlen() function does?
Nov 8 '11 #23
I believed it is for a string, I'm assuming I'm wrong?
Nov 8 '11 #24
Dormilich
8,658 Expert Mod 8TB
yea, but what does it actually do?
Nov 9 '11 #25
Returns the length of the string?
Nov 9 '11 #26
Dormilich
8,658 Expert Mod 8TB
correct.

does that functionality (returning the string length) help you validating the input?
Nov 9 '11 #27
I'm guessing not as it isn't working.
Nov 9 '11 #28
Dormilich
8,658 Expert Mod 8TB
disregarding PHP, describe in words how you you would determine, when the input of the guarantee field is valid.
Nov 9 '11 #29
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
8,658 Expert Mod 8TB
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
Not really sure, assuming a number(s)?
Nov 9 '11 #32
Dormilich
8,658 Expert Mod 8TB
and how would you check if something is a number?


edit: hey, this is my 6,000th post!
Nov 9 '11 #33
Another guess = $number?
Nov 9 '11 #34
Dormilich
8,658 Expert Mod 8TB
? ? ?
Nov 9 '11 #35
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
431 Expert 256MB
@Dormilich
Hey Dormilich congratulations on your 6000
Nov 9 '11 #37
Dormilich
8,658 Expert Mod 8TB
why shouldn’t it send numbers?
Nov 10 '11 #38
so it's sending numbers as representations of:
none, 1 yr extension, 2 yr extension?
Nov 10 '11 #39
Dormilich
8,658 Expert Mod 8TB
you wrote the HTML, didn’t you?
Nov 11 '11 #40
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
8,658 Expert Mod 8TB
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
so you're suggesting not having POST and having GET instead?
Nov 12 '11 #43
Dormilich
8,658 Expert Mod 8TB
it doesn’t matter whether it is $_POST or $_GET, the validation required is the same.
Nov 12 '11 #44
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
8,658 Expert Mod 8TB
what was the message again?
Nov 14 '11 #46
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
8,658 Expert Mod 8TB
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
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
8,658 Expert Mod 8TB
you have no idea what the difference between 1 and "q" is?
Nov 15 '11 #50

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

Similar topics

2
by: GriffithsJ | last post by:
Hi I have been given some text that needs to be displayed on a web page. The text is pre-formatted (includes things like lists etc) and displays okay if I wrap it using the <pre/> tag. ...
21
by: Headless | last post by:
I've marked up song lyrics with the <pre> tag because it seems the most appropriate type of markup for the type of data. This results in inefficient use of horizontal space due to UA's default...
3
Pre
by: Neal | last post by:
A few questions about pre... When presenting preformatted text using the white-space: pre; property/value, Opera renders long lines at small viewport widths as exiting the borders of the...
7
by: Alan Illeman | last post by:
How do I set several different properties for PRE in a CSS stylesheet, rather than resorting to this: <BODY> <PRE STYLE="font-family:monospace; font-size:0.95em; width:40%; border:red 2px...
2
by: Buck Turgidson | last post by:
I want to have a css with 2 PRE styles, one bold with large font, and another non-bold and smaller font. I am new to CSS (and not exactly an expert in HTML, for that matter). Is there a way to...
3
by: Michael Shell | last post by:
Greetings, Consider the XHTML document attached at the end of this post. When viewed under Firefox 1.0.5 on Linux, highlighting and pasting (into a text editor) the <pre> tag listing will...
8
by: Jarno Suni not | last post by:
It seems to be invalid in HTML 4.01, but valid in XHTML 1.0. Why is there the difference? Can that pose a problem when such a XHTML document is served as text/html?
7
by: Rocky Moore | last post by:
I have a web site called HintsAndTips.com. On this site people post tips using a very simply webform with a multi line TextBox for inputing the tip text. This text is encode to HTML so that no...
14
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.