RE: [PHP] $_GET, expressions and conditional statements

2004-03-11 Thread Ford, Mike [LSS]
> -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED] > Sent: 11 March 2004 14:19 > > On Thursday 11 March 2004 21:15, I.A. Gray wrote: > > > What I want the > > script to do is set $SPORDER to this value. If > $_GET['ORDER'] is not > > set then it gets the default valu

Re: [PHP] $_GET, expressions and conditional statements

2004-03-11 Thread Neil Freeman
How about this - untested by the way: $order = "ASC"; if (isset($_GET["ORDER"])) { $value = $_GET["ORDER"]; if (($value == "ASC") || ($value == "DESC")) { $order = $value; } else if ($value == "RAND") { $order = "RAND

Re: [PHP] $_GET, expressions and conditional statements

2004-03-11 Thread Jason Wong
On Thursday 11 March 2004 21:15, I.A. Gray wrote: > I know this is probably really simple, but I am not very good at > expressions and conditional statements. I am wanting to show a list from a > MYSQL database. I am using the URL to store the variables that control the > output. The variable $

[PHP] $_GET, expressions and conditional statements

2004-03-11 Thread I.A. Gray
Hi everyone, I know this is probably really simple, but I am not very good at expressions and conditional statements. I am wanting to show a list from a MYSQL database. I am using the URL to store the variables that control the output. The variable $ORDER can be set to ASC (Ascending), DESC (De