i need some advice on where im going wrong with my code its not giving me any error but its not working the way it should be. when someone types in the serach box a message title it should tell me what messages are in the database with that title but whatever i type it says "this messages is in the database. What i would like it to do would be to show measages that are in the database and then give a link to them. below is the code i have been using
<?
// ajax.php
// Get value coming from request
$message = $_GET['message'];
// Connect to DB
$dbServer=mysql_connect("localhost","","");
if (!$dbServer) {echo "Failed to connect to MySQL"; exit; }
mysql_select_db("",$dbServer);
// Check if name exists in table
if($message=="")
echo("This message is in the database");
else
echo("This message is NOT in the database :(");
//Close connection
?>
<HTML>
<HEAD>
<TITLE>Test Ajax</TITLE>
<SCRIPT type="text/javascript" src="ajax.js"></SCRIPT>
</HEAD>
<BODY>
search for messages: <INPUT type="text" id="message" onblur="send_request(this);">
<DIV id="div_result"></DIV>
</BODY>
</HTML>