Re: Database search logic question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On November 15, 2004 13:27, Stuart Felenstein wrote:
> See inline:
>
> --- "Chris W. Parker" <cparker@xxxxxxxxxxxx> wrote:
> > Stuart Felenstein <mailto:stuart4m@xxxxxxxxx>
> >
> >     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.
>
> It sounds like you answered before you either read or
> understood.  I was talking about
>
> $_SERVER["QUERY_STRING"];
>
> > 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.
>
> In $_POST there is nothing in the URL , there is no ?.
>
> > > 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>
>
> They are not similar but will accomplish the same
> goal.
>
> > 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.
>
> A ccokie wouldn't help me one bit in this situation.
>
> Stuart
Stuart,

Did you take the time to think about what you were going to do before starting 
your application? You are asking more than one question within this newest 
version of your thread and are treating people's responses to each individual 
question as part of one all encompassing answer.

If you are looking to have the SQL query string sent as POST vars but don't 
know how to get those out of the array, I would say you have some RTFMing to 
do, the same would go for sending the users to your results page AND ( you 
can do both POST and GET vars for a single page) adding a querystring to the 
url so that the user could bookmark the url and have a way to return to the 
same query they specified provided that the database query happens on/in the 
results page.

If that answers any of your questions, great, if not, try planning ahead a 
little instead of asking the list to write the functionality code for you.

-- 
Regards,
David Bevan

We could learn a lot from crayons: 
some are sharp, some are pretty, some are dull, some have weird names, 
and all are different colors....but they all exist very nicely in the same 
box. 

http://www.getanyideas.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux