Jump to content

[SOLVED] redirect help


I always need help

Recommended Posts

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 ='[email protected]';

 

//redirection script

header("Location: $page");

 

//sends email

//$send_contact=mail($to,$subject,$message,$header);

 

 

?>

 

 

 

 

Thanks for your help

Link to comment
https://forums.phpfreaks.com/topic/69347-solved-redirect-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.