Hi
I have text box that excepts input and is suppose to echo a message if there is no data entered after the submit button is pressed.
I declared a action variable as follows:
$action = isset($_POST['action']) ? $_POST['action'] : '';
//If action equal 'CHECK' then the user has submitted data for checking
echo 'test2'; //this will echo 'test2'
if (strtoupper($action) == 'CHECK') {
echo 'test3'; //does not get called
if(empty($txt_name) or empty($txt_date) or empty($txt_time) or empty($txt_description)){
$msg .= (!empty($msg)) ? '<BR>': '';
echo $msg .= "Missing Required Fields"; }//close if
}//CLOSE IF
//in my html code I have a table row:
<td width="50"><input type="hidden" name="action" id="action" value="CHECK"></td>
My objective is when the submit button is pressed it will echo the previous message"Missing Required fields"
I have this same code in a previous page and it works fine.
Thank you for any help that can be given
twb