Re: [PHP] Re: Question re empty query SOLVED

2005-03-10 Thread Jackson Linux
Hi, Jochem and everyone This: On 10 Mar 2005, at 15:23, Jochem Maas wrote: if (!isset($_GET['r']) || empty($_GET['r']) || !($r = intval($_GET['r']))) { // show a list of R's include('showlist.inc.php'); } else { // process an R include('process.inc.php'); } Solved my issue entirely, as did Jo

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jochem Maas
Jackson Linux wrote: all you need is 1 if (or if/else) statement, note that my example is the logical reverse of the first if statement I posted (in reply to your question): if (!isset($_GET['r']) || empty($_GET['r']) || !($r = intval($_GET['r']))) { // _GET['r'] is either not set, empty or

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jackson Linux
On 10 Mar 2005, at 07:38, Jochem Maas wrote: Jackson Linux wrote: Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem Ma

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jochem Maas
Jackson Linux wrote: Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem Maas wrote: M. Sokolewicz wrote: Jackson Linux

Re: [PHP] Re: Question re empty query

2005-03-09 Thread Jackson Linux
Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem Maas wrote: M. Sokolewicz wrote: Jackson Linux wrote: Hi, This: if (

Re: [PHP] Re: Question re empty query

2005-03-09 Thread Jochem Maas
M. Sokolewicz wrote: Jackson Linux wrote: Hi, This: if (isset($_GET['r']) && !empty($_GET['r']) && ($r = intval($_GET['r'])) ){ does nobody notice the last 'bit' of the if expression?? if the IF statement evaluates to true then $r _has_ been set!!! $r = "{$_GET['r']}"; //Set the variable

[PHP] Re: Question re empty query

2005-03-09 Thread M. Sokolewicz
Jackson Linux wrote: Hi, This: if (isset($_GET['r']) && !empty($_GET['r']) && ($r = intval($_GET['r'])) ){ $r = "{$_GET['r']}"; //Set the variable $r to mean the category number gods, that's an ugly statement... why don't you simply use $r = $_GET['r']; $fields = '*'; $sort = "ORDE