Jump to content

echo on submit


ilikephp

Recommended Posts

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');
}

?>

Link to comment
https://forums.phpfreaks.com/topic/225656-echo-on-submit/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.