search query in mysql in php problem


Posted on 16th Feb 2014 07:03 pm 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());

}

No comments posted yet

Your Answer:

Login to answer
96 Like 21 Dislike
Previous forums Next forums
Other forums

Code Review - SQL and Insertion Attacks (Warning: Not for Newbs)
Hey guys,

Its been a while, I know. Use to love coming here to answer peoples questions, but

INSERT data problem!
After having an string with apostrophes ', double quotes " or any other special characters, suc

Preventing blank or already entered values
Im trying to learn how to place a read file line by line and prevent duplicate entries and also BLAN

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

Wierd if else problem
Hi guys,

this probably aint wierd for you, but it seems like php is playin up to me. may b i

Mysql error message
help me find out what this error message means:

"Duplicate entry '0' for key 'PRIMARY'&q

Notice Undefined index: reset/ Attempting to redirect, works, but get a notice
Full Header.php is:
Code: [Select]<?php
$reset= false;
$reset= strip_tags($_GET[&quo

problem with script manager
Hi iam using Net.2005.I have created ajax enabledwebsite.i have master page in which i have script m

Sending CC Info by email
I am a little bit less knowledgable in the security area as most developers and I know I have a lot

CURL question
i am wondering if it's possible to use multi curl with login something like

login once to web

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash