search query in mysql in php problem

Posted on 16th Feb 2014 by admin

my search query wont work, i know, that my codes are correct.please help

Code: [Select]<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<div id="insidebox1">
<form name="form3" method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">

<tr><td><p>physician_ID: <td><input type="text" name="pat5" id="pat5" size="15" maxlength="11" value=""/></p></td></tr>
<tr><td><p><input type="submit" name="btn7" id="btn7" value="Search Physician"/></p></td></tr>


</form>
</div>
</table>

<?php
if (isset($_POST['btn7'])) { echo "<center/><a href='physicians.php'>Check the search results
</a></p>";
mysql_query("SELECT * FROM physicians WHERE Physician_ID={$_POST['pat5']}") or die (mysql_error());

}

Other forums