hello guys .
i am making a php Dictionary but i am getting an error .
i dont know where is mistake .
when type something in text box and hit enter .
the page is loging / waiting
after that its Refreshing .
not getting words from database ...
here is my code !
<php
mysql_connect("username.fatcowmysql.com" , "user" , "pass");
mysql_select_db("dict")
?>
<doctype html>
<html>
<head>
<title> Dictinory </title>
<link rel="stylesheet" href="style.css" type"text/css" />
<body>
<div id="main">
<div id="form_area">
<h2> Dictionary !</h2>
<form method="GET" action="index.php" >
<input type="text" name="usr_input" id="usr_input" />
<input type="submit" value=" Search " id="submit" />
</form> <br><br>
<?php
if (isset($_GET['usr_input'])) {
$usr_input = $_GET['usr_input'];
}
if (empty($usr_input)) {
echo 'Cannot Leave the text field blank';
}else{
$data = mysql_query("SELECT * FROM `words` WHERE `words`='$usr_input'");
while ($result = mysql_fetch_array($data)) {
echo $result['mean'];
}
}
?>
</div>
</div>
</body>
</head>
</html>
here is the page which is Dictionary
www.brahvimedia.net/dic