Jump to content

[SOLVED] Need PHP code checked


$username

Recommended Posts

Hello Guys,

  I am having issues with this drop down box look up from MYSQL.

Here is the error

 

Notice: Undefined variable: row in c:\web\www\app\addmember.php on line 58

 

Notice: Undefined variable: row in c:\web\www\app\addmember.php on line 59

 

these are the lines it errors out on

    while ($row = mysql_fetch_assoc($result)) {

        echo \"<option value=\"{$row['UserType']}</option>\";

 

 

<?PHP
$sql = \"SELECT UserType FROM values \";
  if ($result = mysql_query($sql)) {
    if (mysql_num_rows($result)) {
      while ($row = mysql_fetch_assoc($result)) {
        echo \"<option value=\"{$row['UserType']}</option>\";
      }
    }
  }
?>  

 

Thanks,

Brett

Link to comment
https://forums.phpfreaks.com/topic/72125-solved-need-php-code-checked/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.