PHP Form not showing proper error message -


does have idea why showing error message? have tired empty , boolean test.

thanks!

<p>you have full tank of fuel @ <?php echo $intfuelgallons ?> gallons.</p>     <p> want top off tank?       <label>         <input type="radio" name="tanktopoff" value="yes" id="tanktopoff">         yes</label>       <label>         <input type="radio" name="tanktopoff" value="no" id="tanktopoff">         no</label>     </p>     <p><?php echo $varworntires ?> of tires worn. want replace of them?</p>     <label>       <input type="radio" name="tirereplace" value="yes" id="tirereplace">       yes</label>     <label>     <label>       <input type="radio" name="tirereplace" value="no" id="tirereplace">       no</label>     <label>  <?php  if ((($_post['tanktopoff'])!=="no") || (($_post['tanktopoff'])!=="yes")) {  $errormessage .= "<li><h5>you forgot choose if want top off tank! " . ($_post['tanktopoff']) . "</h5></li>"; };  if ((($_post['tirereplace'])!=="no") || (($_post['tirereplace'])!=="yes")) {  $errormessage .= "<li><h5>you forgot choose if want replace tires! ". ($_post['tirereplace']) . "</h5></li>"; }; ?> 

use

if(empty($_post['tanktopoff'])) 

instead of

if ((($_post['tanktopoff'])!=="no") || (($_post['tanktopoff'])!=="yes")) 

and same tirereplace


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -