I have exactly this code to the button:
<input type="image" name="submit" src="../img/bt.gif" border="0" alt="Click here" align="rigth">
i thougth i would have a post variable coming from : name="submit"
to make isset('submit') but i track the value and whenever i click this button i always got bolean(false) value or NULL . Maybe the is another way to track if the submit button was clicked
Believe me! my form has the method set to post!
The same script using a html normal input type=submit works
but i need a button type=image to the submit button
i only want to control this form checking for blank fields
:
<?php
/var_dump(isset($_POST[submit]));/
if (isset($POST['submit']))
{
print "form sent";
$cmp_ob = explode(",", $POST['required']);
$erro = 0;
foreach($cmp_ob as $fieldname) {
if ($_POST[$fieldname] == "") {
print "<br> - $fieldname";
$error++;
}
}
if ($error == 0) {
print "go to other page";
} else {
$errormessage = "<b>Fields above required.";
}
}
?>
<input type="hidden" name="required" value="//all the required fields">
cheers