Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble with session

Status
Not open for further replies.

Kicket

Technical User
Jun 15, 2002
155
0
0
US

<?php
session_start()
?>
<?php
session_register( bbox );

$bbox=$varXY;
echo $bbox;
echo &quot;<a href=my_url>here</a>&quot;;
?>

here is my code, unless i use session_register register the var $bbox, i can't use it in my next page &quot;my_url&quot;
is there a way that i don't need to register it?

$varXY is something user will submit using previews page.
the trouble is, if i use Session_register( bbox ), this variable will stick into explorer until u close explorer.
if some user tries to go back a page and change the variable
it won't work.

is there a way to unregister this variable when go back. or a way to avoid use session_register?

ff
 
Variables must be registered to be available in a session. This is a feature.

Once you are done with a session variable, either issue session_unregister() against it, or set it so a known bogus value and have your code test that variable for the bogus value before attempting to use it. Want the best answers? Ask the best questions: TANSTAAFL!
 
i did
on the next page


//after i ve done using this variable i put
$bbox=&quot;&quot;;
session_unregister( bbox )

but if u click on go back
it will still has the old value in there...
why is that?

ff
 
If you mean you are using the &quot;back&quot; button on your browser, chances are, the browser is displaying the page from memory. Does the value still exist if you click &quot;back&quot; and then refresh the page? Want the best answers? Ask the best questions: TANSTAAFL!
 
yep
what can i do to get rid of it?

ff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top