RES: [PHP] Newbie question, Which way is best?

2008-03-20 Thread Thiago Pojda
De: George J [mailto:[EMAIL PROTECTED] So calling the script via the form works i.e it passes the neccessary variables to constrct the sql query for the next call. As Shawn said, if you really need the query again add it to session, never, NEVER give the user the ability to see/execute

Re: [PHP] Newbie question, Which way is best?

2008-03-20 Thread Philip Thompson
On Mar 19, 2008, at 5:13 PM, George J wrote: Hi Jason, Hope this helps - my 'display_products.php' script -- form method='post' action='display_products.php' ... input type='hidden' name= 'query' value=$query input type='submit' Value='Go'/td ... // pagination routine conditional

Re: [PHP] Newbie question, Which way is best?

2008-03-20 Thread George J
Thiago Pojda [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] De: George J [mailto:[EMAIL PROTECTED] So calling the script via the form works i.e it passes the neccessary variables to constrct the sql query for the next call. As Shawn said, if you really need the query again add

Re: [PHP] Newbie question, Which way is best?

2008-03-20 Thread Shawn McKenzie
George J wrote: Thiago Pojda [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] De: George J [mailto:[EMAIL PROTECTED] So calling the script via the form works i.e it passes the neccessary variables to constrct the sql query for the next call. As Shawn said, if you really need the

Re: [PHP] Newbie question, Which way is best?

2008-03-20 Thread George J
Hi Shawn, My query code- ---SQL query construction block $query = SELECT * FROM prods ; if($catagory != 0){ // if category != 0 $where=WHERE c = $catagory ; if ($manu != 0){ // check manu != 0

Re: [PHP] Newbie question, Which way is best?

2008-03-20 Thread Philip Thompson
On Mar 20, 2008, at 12:05 PM, George Jamieson wrote: Hi Philip, Hope you don't mind me sending this to you direct. Thanks for the answer but... I'm sorry I don't follow you. My form sets up the query parameters. It works. My pagination code passes the page no. It works. What it doesn't

[PHP] Newbie question, Which way is best?

2008-03-19 Thread George J
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

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 3:47 PM, George J [EMAIL PROTECTED] 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

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread Andrew Ballard
On Wed, Mar 19, 2008 at 3:47 PM, George J [EMAIL PROTECTED] 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

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread George J
Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my database. I'm not really aware of all the possible avenues that this method might open up. It just feels

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread Daniel Brown
On Wed, Mar 19, 2008 at 4:45 PM, George J [EMAIL PROTECTED] wrote: Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my database. I'm not really aware

Re: [PHP] Newbie question, Which way is best?

2008-03-19 Thread Jason Pruim
On Mar 19, 2008, at 4:45 PM, George J wrote: Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my database. I'm not really aware of all the possible

[Fwd: Re: [PHP] Newbie question, Which way is best?]

2008-03-19 Thread Shawn McKenzie
George J wrote: Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my database. I'm not really aware of all the possible avenues that this method might

Re: Re: [PHP] Newbie question, Which way is best?]

2008-03-19 Thread George J
Hi Shawn, Shawn McKenzie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] George J wrote: Hi Daniel, WHOA! Passing the SQL query via a URL is a Very Bad Idea[tm]! As a newbie I just have to ask why. I suspect you're going to say it gives the table and field names used in my