Try lowercase 'http'. Anything in error log? Try turning on display_errors.
Cheers,
Tamas
-----Original Message-----
From: Jason Pruim [mailto:[email protected]]
Sent: Sunday, July 31, 2011 8:40 PM
To: <[email protected]>
Subject: [PHP] Problem with header("Location:" )...
So I'm attempting to redirect back to the main site of a page after a
successful insert into a database... Here's my code:
<?PHP
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again."
.
"(reCAPTCHA said: " . $resp->error . ")");
} else {
$name = mysql_real_escape_string($_POST['txtName']);
$comment = mysql_real_escape_string($_POST['areaComment']);
$phonelink = mysql_real_escape_string($_POST['phonelink']);
$SQL = "INSERT INTO comments (name, comment, phonelink) VALUES
('$name', '$comment', '$phonelink')";
mysql_query($SQL) or die("Unable to insert at this time. Sorry for the
inconvience");
//echo "Insert successful!";
header("Location:
HTTP://jason.pruimphotography.com/dev/clients/flewid/Phone/");
// Your code here to handle a successful verification
}
?>
The insert happens, BUT it won't redirect back to the site.... There isn't
any reason I should be able to do a header() redirect at that point is
there?
Or is there a better way to do it?
Thanks Everyone!
Jason Pruim
[email protected]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php