PDA

View Full Version : Email redirect


Gabums
09-02-2008, 05:43 PM
Hello all,

Here's hoping you can help me. I am working in Dreamweaver 8 and using Godaddy as my host. I have a form on my site that submits info to my email address. It works (finally) but when you click on my submit button, the page displayed is a blank page. My goal is to have the user redirected to the first page of my site(bio.html) but I can't seem to make it work. Here is my code...


<?php

$subject = $_POST['subject'];
$message = $_POST['message'];
$to = "myemail.com";
$msg = "$subject\n\n";
$msg = "$message\n\n";

mail($to, $subject, $msg, "From: My web site\nReply-To: $email\n");

?>

I have tried adding the codes...


$url = "bio.html";

or
$continue = "bio.html";

neither of them work. I also tried copying the whole website address (www.mywebpage.com/bio.html (http://www.mywebpage.com/bio.html)) but it still doesn't work.

Any thoughts?

Thank you in advance
Gab

davidj
09-02-2008, 06:35 PM
<?php

$subject = $_POST['subject'];
$message = $_POST['message'];
$to = "myemail.com";
$msg = "$subject\n\n";
$msg = "$message\n\n";

mail($to, $subject, $msg, "From: My web site\nReply-To: $email\n");

header("location:bio.html")
exit;

?>

Gabums
09-03-2008, 01:50 AM
I just want you to know that you are my favorite person right now :)

It worked!

Gab

davidj
09-03-2008, 05:46 AM
well i wouldnt go that far.....

oh go on then!