Hi, I have a form, it is working fine and it validates using spry...
When the user clicks the submit button and all the fields are filled, he will be redirected to the homepage page if not the required fields will be highlighted, I want to add a message next to the submit button or a popup that displays: "Plz check the errors"
this is the code, I think I should add an echo somewhere ?!
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf(
GetSQLValueString($_POST['IP'], "text"));
.
.
.
mysql_select_db($database_myform, $myform);
$Result1 = mysql_query($insertSQL, $myform) or die(mysql_error());
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header('Location: homepage.php');
}
?>