Why won't this work?

Here’s the code…
[INDENT][SIZE=1][COLOR=RoyalBlue]<?php[/COLOR][/SIZE]

[SIZE=1][COLOR=RoyalBlue]if(isset($_POST[‘save’]))[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]{[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] $sitename = $_POST[‘sitename’];[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] [/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] if(!get_magic_quotes_gpc())[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] {[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] $sitename = addslashes($sitename);[/COLOR][/SIZE]

[SIZE=1][COLOR=RoyalBlue] }[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] [/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]include(“config.inc.php”);[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]$dbh=mysql_connect ("$server", “$user”, “$pass”) or die (‘I cannot connect to the database because: ’ . mysql_error());[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]mysql_select_db ("$database");[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] [/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] $query = "INSERT INTO site (sitename) ".[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] "VALUES (’$sitename’)";[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] mysql_query($query, $dbh) or die(‘Error, query failed’);[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] [/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]mysql_close($dbh);[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] [/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] echo “Site - ‘$sitename’ - Has Been Added”;[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] }[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]?>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]Add A Site [/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]<form method=“POST”>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] <table width=“700” border=“0” cellpadding=“2” cellspacing=“1” class=“box” align=“center”>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] <tr> [/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] <td width=“100”>Site Name</td>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] <td><input name=“sitename” type=“text” class=“box” id=“sitename”></td>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] </tr>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] <td width=“100”> </td>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] <td> </td>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] </tr>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] <tr> [/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] <td colspan=“2” align=“center”><input name=“save” type=“submit” class=“box” id=“save” value=“Save Site”></td>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] </tr>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue] </table>[/COLOR][/SIZE]
[SIZE=1][COLOR=RoyalBlue]</form>[/COLOR][/SIZE]
[/INDENT]
I get the Error, query failed,

I can’t seem to figure out what went wrong…

I am running…

PHP ver. 4.4.1
Mysql ver. 4.1.13-standard-log

Cheers,

Jonahholliday