A
Anonymous
Guest
i have a site that is hosted on yahoo.....i want to use session variables to import objects from one page to another....i have successfully done this doing the following
file1: insert.php
<?
session_start();
$sam = "something";
$_SESSION['sam'] = $sam;
?>
file2: select.php
<?
session_start();
$sam = $_SESSION['sam'];
echo $sam;
?>
**i haven't tried this with an object yet, but i assume it will work the same way, anyways....this works great, but when i disable cookies, it doesn't work at all...i am wondering how to do i fix this problem?, can i check to make sure the user is using cookies, and then if they are, then use this method, and if they are not, then have a different approach?, if so, what is this different approach?
i have been searching online, and it seems i can pass sessions through the POST method, but is that ONLY with forms? if not, then how do i implement it?
last question, i normally see websites with something like
http://www.site.php?id=03lswerljsdfl or something like that, which i am assuming is a Query String...is this the same as using sessions, but using the GET method after encrypting it? and what is the best way to pass session variables, Cookies, or POST, or GET
thanks you very much in advance
sam
file1: insert.php
<?
session_start();
$sam = "something";
$_SESSION['sam'] = $sam;
?>
file2: select.php
<?
session_start();
$sam = $_SESSION['sam'];
echo $sam;
?>
**i haven't tried this with an object yet, but i assume it will work the same way, anyways....this works great, but when i disable cookies, it doesn't work at all...i am wondering how to do i fix this problem?, can i check to make sure the user is using cookies, and then if they are, then use this method, and if they are not, then have a different approach?, if so, what is this different approach?
i have been searching online, and it seems i can pass sessions through the POST method, but is that ONLY with forms? if not, then how do i implement it?
last question, i normally see websites with something like
http://www.site.php?id=03lswerljsdfl or something like that, which i am assuming is a Query String...is this the same as using sessions, but using the GET method after encrypting it? and what is the best way to pass session variables, Cookies, or POST, or GET
thanks you very much in advance
sam