Click to See Complete Forum and Search --> : shoving variables from one page to another
ubunreal69
Mar 7th, 2002, 09:51 PM
how can i shove a string variable from one page to the other withough putting it in the address. sending it invisably without assigning cookies.
???
thanx for any help.
ME!
TheGoldenShogun
Mar 8th, 2002, 05:55 AM
You could pass it through a HIDDEN field
<input type='hidden' name='theName' value='<?echo($someVal);?>'>
scoutt
Mar 8th, 2002, 09:48 AM
or if your other pages are in the same .php file
chrisjk
Mar 8th, 2002, 10:14 AM
hmm, how about writing the value to a file, then reading it in the next php file
or
use sessions! which is basically the same thing
ubunreal69
Mar 11th, 2002, 01:38 AM
Originally posted by chrisjk
hmm, how about writing the value to a file, then reading it in the next php file
or
use sessions! which is basically the same thing Explain pls ? :) sounds like the solution I need ;)
chrisjk
Mar 11th, 2002, 08:30 AM
check out sessions here http://www.php.net/manual/en/ref.session.php
they use cookies but only to store the session id, not the actual string. If the user has disabled cookies, then it will put the session id in the URL, like www.somedomain.com/page.php?phpsessid=g34hg34723t48yg23jh3 which it will automatically append
If you don't want to use sessions then as I said just write the string to a flat file in the first script, then read the same file back again in the second script. The user will never know it's happening
Check out file handling stuff here http://www.php.net/manual/en/ref.filesystem.php
ubunreal69
Mar 11th, 2002, 06:04 PM
thanx chrisjk, i'll look at that as soon as i have the chance :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.