I have the same header on another page that deletes entries from the database and it redirects fine which makes me thing there is something wrong with the rest of the code?
Thanks
[php]
if ( $valid == 1 ) {
// If we don't, run the insert query
$dbid = mysql_connect ('localhost', 'usernamr', 'password');
mysql_select_db('database',$dbid)
or die ("Cannot find database");
$query = "INSERT INTO `request_data` (`req_id`, `manufacturer`, `model`, `capacity`, `year`, `part_one`, `part_two`, `part_three`, `part_four`, `part_five`, `full_name`, `telephone`, `alt_telephone`, `email`, `contact_pref`, `area`, `state`, `sent`, `comments` ) VALUES ('', '$manufacturer', '$model', '$capacity', '$year', '$part_one', '$part_two', '$part_three', '$part_four', '$part_five', '$full_name', '$telephone', '$alt_telephone', '$email', '$contact_pref', '$area', '$status', '$sent', '$comments')";
$result = mysql_query($query,$dbid)
or die("INSERT error:".mysql_error());
// If all is cool, this will redirect to a thank you page.
header('Location: thanks.php');
exit;
}
}
[/php]