Forum Moderators: coopster
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource
$result = mysql_query("SELECT FROM musicians WHERE username = '$username' ");
while ($row = mysql_fetch_row($result)) {
$var=$row[0];
}
That's the code... do you see a syntactical error?
<?php
mysql_select_db($db, $con);
$select = "SELECT DISTINCT ID, username, name, email, city, state, zip, nation";
$from = " FROM musicians";
$where = " WHERE '$username'=username";
$results = @mysql_query($select . $from . $where);
if (!$results) {
die('<p>error retrieving musicians<br>' . 'Error: ' . mysql_error() . '</p>');
}
while ($result = mysql_fetch_array($results)) {
$id = $result['ID'];
$musician = htmlspecialchars($result['username']);
$name = $result['name'];
$email = $result['email'];
$city = $result['city'];
$state = $result['state'];
$zip = $result['zip'];
$nation = $result['nation'];
}
?>
<FORM>
<B>Username:</B><BR>
<U><?php echo("$username");?></U>
Thanks.