Jump to content

session prob


fazzfarrell

Recommended Posts

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

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

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.