I keep getting parse errors in the code below and I'm not sure why.
This code is only a snippet that is included in a php file hence the missing database connection which is called by another include
<?php
// generate and execute query
$list_computername_sql = "SELECT cname,machid FROM inventory WHERE clientid='$clientid'";
$list_computername_result = mysql_query($list_computername_sql);
if($myrow = mysql_fetch_array($list_computername_result)){
do
{
printf("<a href=\"displaysystem.php?clientid=$clientid&machid=$myrow["machid"]\">$myrow["cname"])</a>\n";
}while ($myrow = mysql_fetch_array($list_computername_result));
}
else
{
echo"no results";
}
?>