Also, some observations:
Your code is hard to sort through when it isn't formatted to be pleasant to the eye, indent your code - or at the very least double space it!
Stay consistent with your variable names! I think capitalization is a bad idea, because then if you misspell a variable, you're all day trying to figure out what went wrong. As was the case in $Tablename. I like all lowercase with underscores to separate words. But that's just me. Pick a standard and stay with it.
Code:
<?php
// Set the variables for the database access:
$Host = "***";
$DBName = "***";
$TableName = "Doctors";
$Link = mysql_connect ($Host, '***', '***');
if ($Link==false) {
echo mysql_errno().": ".mysql_error()."<br />\n";
}
mysql_select_db ($DBName, $Link);
$Query = "DELETE FROM $Tablename WHERE Doctor = "ppp"";
if (mysql_query ($Query, $Link)) {
print "The query was successfully executed!<br />\n";
} else {
print "The query could not be executed!<br />\n";
print mysql_errno().": ".mysql_error()."<br />\n";
}
?>
The <BR> tag that you use is also deprecated under HTML 4.01. Deprecated means slated for deletion from the standard. Under a strict docutype setting that tag should fail.
See this article on how to do it right:
http://p2p.wrox.com/topic.asp?TOPIC_ID=2251
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::