Hi,
I’m a php newbie and using a php form hosted on godaddy. And I can’t seem to get session variables to work. Here is my code:
Page 1:
session_start(); // start up your PHP session!
session_regenerate_id(true);
$_SESSION[‘send_to’] = $to;
$_SESSION[‘send_subject’] = $subject;
$_SESSION[‘send_body’] = $body;
header( “Location: http://somesite.com/thankyou.php”);
session_write_close();
Page 2:
session_start();
$to = $_SESSION[‘send_to’];
$subject = $_SESSION[‘send_subject’];
$body = $_SESSION[‘send_body’];
$mail = mail($to, $subject, $body);
In response I get the following error message for each of my session variables: “Notice: Undefined index: send_to”
Please help! I’ve been searching the forums for help but I haven’t found anything useful to me yet…