PHP Script
The php script that is executed once the form is filled out:
<?php
$connect = mysql_connect($h, $u, $p) or die ("Connect Submit at this time.");
mysql_select_db($db);
## Escape bad input including '/', '"', etc
////////////////////////////////////////////////////////////////
if(!empty($_POST['InterestedEmail']))
$subscriberEmail=mysql_real_escape_string($_POST['InterestedEmail']);
////////////////////////////////////////////////////////////////
if(!empty($_POST['InterestedBrowser']))
$subscriberBrowser=mysql_real_escape_string($_POST['InterestedBrowser']);
////////////////////////////////////////////////////////////////
## check for nmll values, if all are set, INSERT
if (isset($_POST['submit'])) {
$query="INSERT INTO launching(lauEmail, lauBrowser)
values('$subscriberEmail', '$subscriberBrowser')";
mysql_query($query) or die(mysql_error());
#HERE
}
?>
How do I get PHP to run this JS code: window.alert('Submitted. Thank you.') once the script reaches #HERE
You could end the PHP and restart it and just put the JS in there, or if you want to embed it right there in the PHP where you have #here then how about echo/print it: