As a first timer with PHP and MySQL I have encountered a problem with this code :
<?
$link_id = mysql_connect("localhost","counticare","grafnic");
if (mysql_select_db("counticare", $link_id)) echo "Connected to the LOCALHOST";
else die("Connection failed...");
$result = mysql_list_dbs($link_id);
echo "Result of database OPEN -- $result --"
$enquiry = mysql_query("SELECT * FROM vacancy", $link_id);
while($query_data = mysql_fetch_row($enquiry)) {
echo $query_data[1], " -- ",$query_data[2], " -- ", $query_data[3], " -- ",$query_data[4]," == <P>";
}
?>
The following error is displayed. Can anyone tell me what is wrong with the line(s) and why.
Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in c:\inetpub\wwwroot\TMPgemk9orh85.php on line 7
Thanks
Nic