Re: [PHP] Clean Up the sand box time

2003-08-23 Thread John Taylor-Johnston
Yes, but must be a better way to setup my if.then's ? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Clean Up the sand box time

2003-08-23 Thread Nicholas Robinson
On Friday 22 Aug 2003 10:26 pm, John Taylor-Johnston wrote: This is my favourite question. Can I clean up my 'if then' statements a tad? Must be a cleaner way? Still learning, still having fun :) Thanks, John $news = mysql_query($sql) or die(print document.write(\.mysql_error().\););

[PHP] Clean Up the sand box time

2003-08-22 Thread John Taylor-Johnston
This is my favourite question. Can I clean up my 'if then' statements a tad? Must be a cleaner way? Still learning, still having fun :) Thanks, John $news = mysql_query($sql) or die(print document.write(\.mysql_error().\);); $found = 0; while ($mydata = mysql_fetch_object($news)) {

Re: [PHP] Clean Up the sand box time

2003-08-22 Thread Robert Cummings
Absolutely, the best way *tongue in cheek* is to format as follows: $news = mysql_query($sql) or die( print document.write(\.mysql_error().\);); $found = 0; while( $mydata = mysql_fetch_object( $news ) ) { if( $getaddr == $mydata-IPAddress ) { $found = 1; } } if( $found 0 )