Rick Duval wrote:
I'm using an "OnClick" routine to set a session variable before I go
to another page.
onClick=<?php $_SESSION['local_part']= 'rick'; ?> works fine but I
need a variable where "rick" is
I've tried
onClick=<?php $_SESSION['local_part']= $local_part; ?>
and other variations but it doesn't work.
Can anybody tell me what the proper formatting is to get this to
resolve correctly?
Not sure what you're trying to do exactly, but if you're trying to get
the 'onClick' to set the $_SESSION['local_part'] variable, it won't.
onClick is handled by your browser. PHP runs from the server and has no
idea what your browser is doing.
You either need to do an ajax call to connect to the server, set the
session var, then do the page redirect - or use a get variable and use
that on the next page.
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php