I am having a form filled out then when it is submitted it refreshes the page with the variables, if the fields are filled out correctly it is supposed to redirect to another page, but the page just goes blank. Here is my code:
<?php
if ($submit){
$db_name = "xxxx";
$db_user = "xxxx";
$db_pass = "xxxx";
$db = mysql_connect("xxxxxx", "$db_user", "$db_pass");
mysql_select_db("$db_name",$db);
$sql = "INSERT INTO active (TerminalID,PaidTill) VALUES ('$TerminalID',NOW())";
$result = mysql_query($sql);
header ("Location: newpage.html");
}else{
echo "test";
?>
Can anyone tell me why this does not work and what a solution would be? Thanks.