i have the following code:
what this code should do is run a select statement and then pass the output to a variable and display it.
$getunitid = @mysql_query("SELECT unitid FROM units WHERE name = '$newingname'");
echo'<p>fail ' . mysql_error() . '</p>';
while ($row = mysql_fetch_array($getunitid))
$unitid = $row['unitid'];
The query runs fine as fail is not outputted. however the next part is the problem. test ok is not out put. therefore i think there must be something wrong with my statement but i dont know what. can anyone heklp?