I have a function that's supposed to query mysql with a zip code, and generate an html <select> box with possible cities. Instead, it crashes the site and gives this error:
The content of the function is:
Fatal error: Can't use function return value in write context in /home/rahl/public_html/RVM/include/functions.php on line 298
I've never gotten this error before and I'm not really sure what it means...
$query = "SELECT * FROM zip WHERE zip = '$zip'";
$result = safe_query($query);
if (mysql_num_rows($result) = 1)
$city_select = "<select>";
while($row = mysql_fetch_array($result))
$city_select .= "<option>".$row['city']."</option>";
$city_select .= "</select>";
$row = mysql_fetch_array( $result );
$city_select = $row['city'];
Any help is appreciated, as always.