How do I check for an empty field in a form?
<?php
$formvalue = "on";
if(empty($formvalue)) { echo "I am empty!"; }
?>
People sometimes get confused between isset and empty - the former just checks whether the variable is present or not but ignores any value it may or may not have.
Comment on this Question and Answer >>>
ASK A QUESTION
More forms PHP Questions
How do I remove HTML tags from a string?DYnamic Dropbox when I select a value it has to add a textbox to a specific position in the form how do I do it?? If I could change the dropbox in a textbox and make it add Textboxes depending on the number typed it would be even better but dont think th
how to i decimal, comma, and $ format a number called from mysql displayed in a table cell using php. This is the call script and this is the formatting script How do I replace the $value=123... with my call script? Thanks
Dear Friends, I need to enable the user to add a drop down menu and a text field by only clicking on button (in case the user wants more) I have the following codes how do I make it better: Enter User : Truck Mixer
How can I access information sent through POST on a form?
