Jump to content

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 ='beta@netstander.com';

 

//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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.