[PHP-DB] IF statement in WHILE statement

2007-02-13 Thread Matthew Ferry
Hello Everyone, Got another simple problem here I am trying to do a if statement inside a while (mysql_fetch_array) Here is my code: if ($link = mysql_tech_array($links)) { do { if ($_GET['page'] = $link[file]) { $status = 'reg_button.php'; } else { $status = 'push_button.php'; }

Re: [PHP-DB] IF statement in WHILE statement

2007-02-13 Thread Chris
Matthew Ferry wrote: Hello Everyone, Got another simple problem here I am trying to do a if statement inside a while (mysql_fetch_array) Here is my code: if ($link = mysql_tech_array($links)) { do { if ($_GET['page'] = $link[file]) { You're assigning $_GET['page'] to whatever is

Re: [PHP-DB] IF statement in WHILE statement

2007-02-13 Thread Matthew Ferry
Thanks Chris... added the extra = and its working fine... Have a nice day everyone Matt - Original Message - From: Chris [EMAIL PROTECTED] To: Matthew Ferry [EMAIL PROTECTED] Cc: php-db@lists.php.net Sent: Tuesday, February 13, 2007 11:53 PM Subject: Re: [PHP-DB] IF statement