I always need help Posted September 14, 2007 Share Posted September 14, 2007 Heres the problem. I have an email form on a site that I am working on. It sends from a small JS popup that is activated by clicking on a link. that form sends to a php page which sends the user entered variables to an email address. what I am looking to do is instead of going to a new page when the form is sent I want to redirect the user back to the page the submited the form from. I have it set up to send a hidden var to the php page with the full url of the origional form. here is the functional code I have on the php page. what is hapening is the email is being sent but the php page is being displayed instead of redirecting. <?php //Page reference for redirect $page = $page_ref; // Contact subject $subject ="Beta Web"; // Mail of sender $mail_from="$customer_mail"; // From $header="from: $name <$mail_from>"; // Enter your email address $to ='beta@netstander.com'; //redirection script header("Location: $page"); //sends email //$send_contact=mail($to,$subject,$message,$header); ?> Thanks for your help Quote Link to comment https://forums.phpfreaks.com/topic/69347-solved-redirect-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.