Re: [PHP] Question about $_GET

2003-01-15 Thread Frank Keessen
eessen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 1:22 PM Subject: Re: [PHP] Question about $_GET > Make life easy for yourself: > > $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = ".$_GET['id'

Re: [PHP] Question about $_GET

2003-01-15 Thread Jason Wong
On Thursday 16 January 2003 04:35, [-^-!-%- wrote: > I agree with Chris, the quote should stay there to prevent confusion. > Nevertheless, I often run in the same problem. Sometimes, the only way to > fix it is by removing the quotes ($_GET[id]). > > I know PHP documents goes against this, but it

Re: [PHP] Question about $_GET

2003-01-15 Thread [-^-!-%-
I agree with Chris, the quote should stay there to prevent confusion. Nevertheless, I often run in the same problem. Sometimes, the only way to fix it is by removing the quotes ($_GET[id]). I know PHP documents goes against this, but it dosn't always work with the quotes. Perhaps the dev team

Re: [PHP] Question about $_GET

2003-01-15 Thread Chris Shiflett
--- Frank Keessen <[EMAIL PROTECTED]> wrote: > So the code looks like this: > > $query = "SELECT Newsheadline, News, Contact FROM news > WHERE Newsid = $_GET['id']"; > > But all i'm getting in my browser is: > > parse error, expecting `T_STRING' or `T_VARIABLE' or > `T_NUM_STRING' I could not t

Re: [PHP] Question about $_GET

2003-01-15 Thread Rick Emery
Make life easy for yourself: $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = ".$_GET['id']; - Original Message - From: "Frank Keessen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 4:50 AM Su

Re: [PHP] Question about $_GET

2003-01-15 Thread Jason Wong
On Wednesday 15 January 2003 18:57, Frank Keessen wrote: > Thanks, but not working: > > The error message: > Error in query: SELECT Newsheadline, News, Contact FROM news WHERE Newsid = > . You have an error in your SQL syntax near '' at line 1 > > Here are both lines: > > $query = "SELECT Newsheadl

Re: [PHP] Question about $_GET

2003-01-15 Thread TomH
ewsid = {$_GET['id']}"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); Regards, Frank - Original Message - From: "Danny Shepherd" <[EMAIL PROTECTED]> To: "Frank Keessen" <[EMAIL PROTECTED]>; <[EMAIL

Re: [PHP] Question about $_GET

2003-01-15 Thread Marek Kilimajer
Chris Hayes wrote: Let me explain. For one, the single quotes are not in the way here because the query is written between double quotes. Then, leaving out the single quotes like Marek suggests will only work because PHP is too programmer-friendly. But the indexes of such arrays should al

Re: [PHP] Question about $_GET

2003-01-15 Thread Chris Hayes
At 11:57 15-1-03, Marek Kilimajer wrote: "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = $_GET[id]"; - removed single quotes I think that that is a really bad advice. Let me explain. For one, the single quotes are not in the way here because the query is written between double q

Re: [PHP] Question about $_GET

2003-01-15 Thread Jason k Larson
($query) or die ("Error in query: $query. " . > mysql_error()); > > Regards, > > Frank > - Original Message - > From: "Danny Shepherd" > To: "Frank Keessen" ; > Sent: Wednesday, January 15, 2003 11:54 AM > Subject: Re: [PHP] Question about $_GET > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question about $_GET

2003-01-15 Thread Jason k Larson
Error in query: $query. " . mysql_error()); Regards, Frank - Original Message - From: "Danny Shepherd" To: "Frank Keessen" ; Sent: Wednesday, January 15, 2003 11:54 AM Subject: Re: [PHP] Question about $_GET -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question about $_GET

2003-01-15 Thread Frank Keessen
ED]> Sent: Wednesday, January 15, 2003 11:54 AM Subject: Re: [PHP] Question about $_GET > Try > > $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = > {$_GET['id']}"; > > HTH > > Danny. > - Original Message - > From: &quo

Re: [PHP] Question about $_GET

2003-01-15 Thread Marek Kilimajer
"SELECT Newsheadline, News, Contact FROM news WHERE Newsid = $_GET[id]"; - removed single quotes Frank Keessen wrote: Hi All, Can you please help me with the following problem? I've had code wich was running fine with php till i've upgraded to PHP version 4.2.3. The original code line was:

Re: [PHP] Question about $_GET

2003-01-15 Thread Danny Shepherd
Try $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = {$_GET['id']}"; HTH Danny. - Original Message - From: "Frank Keessen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 10:50 AM Subject: [PH

[PHP] Question about $_GET

2003-01-15 Thread Frank Keessen
Hi All, Can you please help me with the following problem? I've had code wich was running fine with php till i've upgraded to PHP version 4.2.3. The original code line was: $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = '$id'"; but it's not working when you have register

Re: [PHP] question about $_GET, etc

2002-09-12 Thread olinux
You need to turn register_globals off in your php.ini file. This is default in php 4.2+ Try this article for a great overview: http://www.webmasterbase.com/article/758/8 olinux --- swade <[EMAIL PROTECTED]> wrote: > On my laptop i still have 4.11 apache,linux on it > but its just for > develo

[PHP] question about $_GET, etc

2002-09-11 Thread swade
On my laptop i still have 4.11 apache,linux on it but its just for development. I must be confused about get and post handling. I've been referrencing them in $_GET, etc but I was just working on something and linked to a script by using ?section=duh in the query string,etc Now i thought $duh