I'm trying to check to see if the user has clicked the submit button on a form. In this case the submit button is not the standard grey HTML button but an image.
if (isset($_POST['submit_absence'])) {
mysql_query($sqlInsert,$conn) or die('Error, query failed');
}
submit_absence is the name of the submit image.
echo '<input type="image" name="submit_absence" src="images/submit.JPG"></input>';
If I use the above code, nothing is ever set and the query never executes.
if I use..
echo '<input type="submit" name="submit_absence" value="Submit Request"></input>';
...then it gets set and the query executes. I need to be able to use the image rather than the lame HTML submit button.
Any help??
Thanks,
Scott