Re: Newbie question, Which way is best?

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

 



On Wed, Mar 19, 2008 at 3:47 PM, George J <georgejamieson@xxxxxxxxxxxxx> wrote:
> Hi,
>
>  I have a script that contains a form and a pagination routine that calls
>  itself. I want to pass an sql query along with some other variables to the
>  called script. The code to acheive this, using the form, is working but when
>  I try to write the code, using the scripts URL to call itself, I am having
>  problems successfully passing the SQL query string within the url.
>
>  The form is used to construct a string containing a sql query. Whereas when
>  the pagination calls the script all it does is changes the LIMIT part of the
>  sql query. I know it won't pass the original query unless I add it to the
>  URL address.
>
>  Is there a 'proper' way to write this code? Should I add the query to the
>  URL or is there a better way?
>
>  TIA
>  George

My personal preference is to add all of the query parameters as hidden
fields in your form and pass them along from page to page. I wouldn't
send the actual SQL query (or any part of it) as part of the URL.

Andrew

-- 
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