right now it's just thrown together like this...
if ($_POST['preview']) {
echo "<form ACTION=\"new.php\" METHOD=\"POST\">";
echo "<tr><td class=\"head\" colspan=\"2\" align=\"right\">Review the Details</td></tr>";
echo "<tr><td class=\"dark\" colspan=\"2\"><b>
".stripslashes($_POST['title'])."</b><br>
".$_POST['dateon']."<br>
".$_POST['address']."<br>
".$_POST['city'].", ".$_POST['state']."<br>
".$_POST['description']."<br>
".$_POST['user']."<br>
".$_POST['phone']."<br>
".$_POST['email']."</td></tr>";
echo "<tr><td class=\"dark\" colspan=\"2\"><input type=\"submit\" value=\"Submit\" name=\"submit\"><input type=\"submit\" value=\"Edit\" name=\"edit\"></td></tr></form></table></table>";
include("../include/foot.php");
exit;
}
if ($_POST['submit']) {
$date=date("n/j/Y H:i:s");
$query = sprintf(
"INSERT INTO events (date, user, title, `desc`, address, city, state, " .
"phone, dateon, email) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', " .
"'%s', '%s', '%s')",
$date,
mysql_real_escape_string($_POST['user']),
mysql_real_escape_string($_POST['title']),
mysql_real_escape_string($_POST['description']),
mysql_real_escape_string($_POST['address']),
mysql_real_escape_string($_POST['city']),
mysql_real_escape_string($_POST['state']),
mysql_real_escape_string($_POST['phone']),
mysql_real_escape_string($_POST['dateon']),
mysql_real_escape_string($_POST['email'])
);
$sql = mysql_query($query) or die(mysql_error() . "<br />$query");
echo "<tr><td class=\"dark\" colspan=\"2\">Your event should be posted soon. Thank you!</td></tr>";
include("../include/foot.php");
exit;
}
like i said, on the preview page everything you type in is displaying fine but once you click submit, it sends only the date. can the variables not be transferred over 2 forms or whatever :p