RE: [PHP] Database search logic question

From: Date: Mon, 15 Nov 2004 17:21:01 +0000
Subject: RE: [PHP] Database search logic question
Groups: php.general 
Request: Send a blank email to php-general+get-202053@lists.php.net to get a copy of this message
Stuart Felenstein <mailto:stuart4m@yahoo.com> on Monday, November 15, 2004 1:10 AM said: > The way I was approaching this was to grab the url, > the part after the ? , so not the referer. This sounds like you're not familiar with the $_GET array. $_GET is everything after the ? in the url but as an array. > Whatever the second part is called. I *think* that's the querystring. Not sure on that though. > Only now that I've created a search and results page > via Post method, of course there is nothing going to > the URL. This sounds like you're not familiar with the $_POST array. $_POST is everything that *would be* after the ? in the url but as an array. > I'm wondering at this point if I should > create a way to let users save their search > parameters, by grabbing the variables and storing them > as an array in the database or go back to the URL > method. I don't see how these two things are similar. <shrugs> If you want to store your array in a db use serialize() and unserialize(). In any case I would just store the search criteria in a cookie and leave the db out of it. HTH, Chris. * http://www.php.net/serialize http://www.php.net/unserialize

« previous php.general (#202053) next »