NYCPHP Meetup

NYPHP.org

[nycphp-talk] handling forms (relative newbie)

David Mintz dmintz at panix.com
Thu Oct 2 15:57:05 EDT 2003


You could also consider array_merge() to update $_SESSION with $_POST
variables -- after your sanity check of course.

$_SESSION = array_merge($_SESSION,$_POST);

http://us3.php.net/manual/en/function.array-merge.php


On Thu, 2 Oct 2003, Scott Mattocks wrote:

>
> > $_SESSION = $_POST;
>
> You just killed anything else you had in the session with that line. You
> probably don't want to overwrite your entire session array.  Use
> something like was suggested before:
> $_SESSION['_POST'] = $_POST;
> This will still let you access other info that was in your session.



---
David Mintz
http://davidmintz.org/
Email: See http://dmintzweb.com/whitelist.php first!

"Y dále p'abajo"

	Tito Rojas



More information about the talk mailing list