Page 1 of 1
about sessions
Posted: Fri Jun 18, 2004 2:31 am
by bugthefixer
i have used sessions in my site
when a user from the current page clicks 'back' then the previous pge does not display rather it says refresh the page..
how can i get rid of this problem
Posted: Fri Jun 18, 2004 2:35 am
by feyd
this generally happens when you have post data being passed. Switching those to get calls will, generally, fix them. However, the url will get funky looking..
about post and get
Posted: Fri Jun 18, 2004 2:46 am
by bugthefixer
i know its not relevant to this forum but can u please tell me whats the difference between get and post.
Posted: Fri Jun 18, 2004 2:57 am
by feyd
get values are passed in the url:
www.foo.com/index.php?foo=bar&foo2=12
whereas post values are sent in the HTTP request header passed by the browser. So the url would remain
www.foo.com/index.php
to see the get/post variables passed to your page(s):
Code: Select all
<?php
print_r($_GET); // write all the stuff in get variables
print_r($_POST); // write all the stuff in the post variables
?>
to access the get variables from the first example:
Code: Select all
<?php
if(isset($_GET['foo']))
{
echo $_GET['foo']."\n";
}
if(isset($_GET['foo2']))
{
echo $_GET['foo2']."\n";
}
?>
Posted: Fri Jun 18, 2004 4:27 pm
by tim
theres a tutorial in the 'Wiki' section
Passing vars via $_GET & $_POST, read it.

Posted: Sat Jun 19, 2004 4:19 am
by Zooter
Doesn't it have something to do with the caching of web pages?
Posted: Sat Jun 19, 2004 4:22 am
by zenabi
tim wrote:theres a tutorial in the 'Wiki' section
Just curious, what's the 'Wiki' section?
Posted: Sat Jun 19, 2004 7:47 am
by patrikG
http://wiki.devnetwork.net/
It's in the navigation of this site, at the very top of this page - a small link called "Wiki".
Regarding your original problem: check the manual on [php_man]header[/php_man], look at no caching.