Ok, yes that worked fine thanks! Didn't see that in there, that was a left over from a previous attempt! Finally, anyone got an idea as to why the following won't work?
Below is the code I am using. I keep getting the "Illegal Query 1" response. Also, I tried putting in the line which you suggested for debugging but it couldn't parse it.
<?php
if (!$link = mysql_connect("localhost", "EGKK", "sitelink"))
exit("Unable to make a connection to the database");
if (!mysql_select_db("EGKK", $link))
exit("Unable to select the database");
// Define a SQL Select Query
$query = "TRUNCATE $day ";
if (!$result = mysql_query($query, $link))
exit("Illegal query 1");
?>