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/)
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-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
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,
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
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:
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
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
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();
--
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
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
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 -
12 matches
Mail list logo