form
Code: Select all
<form method="post" name="form2" action="<?php echo $editFormAction; ?>">
<input type="text" name="maillistEmail" placeholder="email address" class="textox">
<input type="submit" name="btn2" class="btn" value="SIGNUP">
<input type="hidden" name="MM_insert" value="form2">
</div>
</form>
Code: Select all
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
$insertSQL = sprintf("INSERT INTO beau_mailist (maillistEmail) VALUES (%s)",
GetSQLValueString($_POST['maillistEmail'], "text"));
mysql_select_db($database_beauSS15, $beauSS15);
$Result1 = mysql_query($insertSQL, $beauSS15) or die(mysql_error());
$insertGoTo = "mail-list-thank-you.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
$customerEmail = $_POST["maillistEmail"];
then the mail script...