[PHP] Is the syntax correct?

2005-04-12 Thread Labunski
Is the syntax correct? (in connection with $order) : switch ($page) { case news: $order = DESC break; case articles: $order = ASC break; } mysql_query( SELECT * FROM data ORDER BY id $order ); Sorry for my bad english, Lab. -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Is the syntax correct?

2005-04-12 Thread Richard Davey
Hello Labunski, Tuesday, April 12, 2005, 3:09:43 PM, you wrote: L Is the syntax correct? (in connection with $order) : Nope. You need ; after the $order = lines. L switch ($page) { L case news: L $order = DESC L break; L case articles: L $order = ASC L break; L } I.e.: $order

Re: [PHP] is this syntax correct?

2001-04-05 Thread Plutarck
Re-arrange the code. ?php session_register("$test"); $test = "foo"; ? Always use session_register first, then follow it with assigning the variable a value. May not be required in the future, but do it anyway for clarity. I don't think you need the global line at all. global is used inside of

Re: [PHP] is this syntax correct?

2001-04-05 Thread Plutarck
ED] To: Jacky@lilst [EMAIL PROTECTED] Sent: Monday, April 02, 2001 3:48 AM Subject: Re: [PHP] is this syntax correct? do you have session_start(); at the top of the next page? - Original Message - From: Jacky@lilst [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday,

[PHP] is this syntax correct?

2001-04-02 Thread Jacky
Hi all is this syntax correct to work on session in php4? ?php global $test; $test = "foo"; session_register("$test"); ? but nest page when I call variable $test to echo it, nothing come up? what did I do wrong? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you

RE: [PHP] is this syntax correct?

2001-04-02 Thread Joseph Bannon
What does global and session_register do? J Say I'm Hot! - Post Your Picture! http://www.sayimhot.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail:

Re: [PHP] is this syntax correct?

2001-04-02 Thread [EMAIL PROTECTED]
yourself" - Original Message - From: Joseph Bannon [EMAIL PROTECTED] To: Jacky@lilst [EMAIL PROTECTED] Sent: Monday, April 02, 2001 3:44 AM Subject: RE: [PHP] is this syntax correct? So what is the right way to do? I resent my email to the list. I've done mostly DB work, so I need to

Re: [PHP] is this syntax correct?

2001-04-02 Thread [EMAIL PROTECTED]
CTED] Sent: Monday, April 02, 2001 3:48 AM Subject: Re: [PHP] is this syntax correct? do you have session_start(); at the top of the next page? - Original Message - From: Jacky@lilst [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 02, 2001 10:43 PM Subject: Re: [PHP] is t

Re: [PHP] is this syntax correct?

2001-04-02 Thread Christian Reiniger
On Monday 02 April 2001 22:30, you wrote: Hi all is this syntax correct to work on session in php4? ?php global $test; $test = "foo"; session_register("$test"); ? but nest page when I call variable $test to echo it, nothing come up? what did I do wrong? Jack Use session_start(); --

Re: [PHP] is this syntax correct?

2001-04-02 Thread Christian Reiniger
On Monday 02 April 2001 10:44, you wrote: What does global and session_register do? RTFM -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Pretty cool, the kind of power information technology puts in our hands these days. - Securityfocus on probing 3600 hosts for known

Re: [PHP] is this syntax correct?

2001-04-02 Thread Jack Dempsey
M Subject: Re: [PHP] is this syntax correct? do you have session_start(); at the top of the next page? - Original Message - From: Jacky@lilst [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 02, 2001 10:43 PM Subject: Re: [PHP] is this syntax correct? I al

Re: [PHP] is this syntax correct?

2001-04-02 Thread Yasuo Ohgaki
self" - Original Message - From: Wade Halsey [EMAIL PROTECTED] To: Jacky@lilst [EMAIL PROTECTED] Sent: Monday, April 02, 2001 3:48 AM Subject: Re: [PHP] is this syntax correct? do you have session_start(); at the top of the next page? - Original Message -