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">
Did you know?Explore Trending and Topic pages for more stories like this.
<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

Add 5 to a variable when a button is clicked, and re-run a for loop
So I'm making a feedback sort of section on a website with MySQL and PHP, I've gotten the script to

Hyperlink in PHP to MySQL record
Hello,

I am having trouble as i am new to php. I have connected to the database and I have di

MVC - Code review
I'm in the process of trying to wrap my head around MVC, and as part of that, I'm attempting to impl

explode() function problem maybe
Hi I'm having trouble searching my database. When I type two words in the search field it only searc

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

Select all entries from database that include a phrase
I have a database of clubs - one of the categories is meeting time and place
I would like to have

How to Handle more than one submit button in single form?
Hi
I have one PHP file which contains one Form. In this form there are two Submit type Buttons

Auto-populating dropdowns and multiple forms.
Here's what I have so far:

First drop down = select a state (works)
This populates the sec

PHP Mysql Staff Induction System
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi

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