fazzfarrell Posted February 13, 2007 Share Posted February 13, 2007 I have this session and can not get it to work? I have the same session running on another server and it works fine. can any one help <?php ini_set("session.save_path", "../SESSIONS"); session_start(); // Rob Farrell Hold the thank you message to print on the page $MailCon = $HTTP_GET_VARS['MessageT']; if ($MailCon != '') $_SESSION["MailCon"] = $MailCon; ?> Link to comment https://forums.phpfreaks.com/topic/38282-session-prob/ Share on other sites More sharing options...
JasonLewis Posted February 13, 2007 Share Posted February 13, 2007 what happens? any errors? are you sure that the directory exists? instead of using $HTTP_GET_VARS use $_GET, its a lot more simpler. Also, should you add in something that will echo out the session. to see if it set the session. Link to comment https://forums.phpfreaks.com/topic/38282-session-prob/#findComment-183464 Share on other sites More sharing options...
fazzfarrell Posted February 13, 2007 Author Share Posted February 13, 2007 I have an echo statement <?php echo $MailCon; ?> if I set the value of the session to: 'thanks'; it prints on the page as soon as I take the value from a hidden field (value - thanks) nothing! i tried <?php //to test sessons on a server, first create a folder called SESSIONS outside the root directory - Rob Farrell ini_set("session.save_path", "../SESSIONS"); session_start(); if (isset($_SESSION['test'])){ echo "Session found: test is set to ".$_SESSION['test']."<br />\n"; } else { $_SESSION['test'] = "you have sessions enabled"; echo "No session data found, so setting the test variable<br />\n"; echo "Click <a href=\"".$_SERVER['PHP_SELF']."\">here</a> to test it out<br />\n"; } ?> that works fine? Link to comment https://forums.phpfreaks.com/topic/38282-session-prob/#findComment-183471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.