Reply
Old 04-25-2008, 07:18 AM how make this
Novice Talker

Posts: 9
Name: kamsmartx
Trades: 0
take this code
PHP Code:
<select name="FileNo" id="select2" onChange="change_title();"> 
    <?  
$query
="SELECT * FROM pationts"
$result=mysql_query($query) or die("error: " mysql_error()); 
while(
$row=mysql_fetch_array($result)) 

    echo 
"bla"
?>   
<option value="<?php echo $row['FileNo'] ; ?>"><?php echo $row['FileNo'] ; ?></option>    
<? 
    
}   
?> 
</select>
he above code is for list i need to select value from it and when i select value we must change vale on the below code
Code:
PHP Code:
<input name="PationtName" type="text" id="title"/> 
the result is :-
when i select FileNo:111 we print on PationtName: 111
this wrong we must print name of pationt who FileNo is 111
kamsmartx is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 04-25-2008, 07:37 AM Re: how make this
rogem002's Avatar
Super Spam Talker

Latest Blog Post:
Making Zebra Stripes with CSS3
Posts: 835
Name: Mike
Location: United Kingdom
Trades: 0
The query should look a bit more like
PHP Code:
$query="SELECT * FROM pationts WHERE FileNo='111'"
__________________
PHP Code:
Add_Talkupation('rogem002'); // Because sharing is awesome! 
Fix 90% of your problems | Full On Design
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 04-25-2008, 08:14 AM Re: how make this
Novice Talker

Posts: 9
Name: kamsmartx
Trades: 0
no no
look for me

i wont when i choose from
PHP Code:
<select name="FileNo" id="select2" onChange="change_title();"> 
    <?  
$query
="SELECT * FROM pationts"
$result=mysql_query($query) or die("error: " mysql_error()); 
while(
$row=mysql_fetch_array($result)) 

    echo 
"bla"
?>   
<option value="<?php echo $row['FileNo'] ; ?>"><?php echo $row['FileNo'] ; ?></option>    
<? 
    
}   
?> 
</select>
print into the
PHP Code:
<input name="PationtName" type="text" id="title"/> 
name of pationt
kamsmartx is offline
Reply With Quote
View Public Profile
 
Old 04-25-2008, 10:25 AM Re: how make this
Novice Talker

Posts: 9
Name: kamsmartx
Trades: 0
any help
kamsmartx is offline
Reply With Quote
View Public Profile
 
Old 04-25-2008, 12:16 PM Re: how make this
Novice Talker

Posts: 9
Name: kamsmartx
Trades: 0
??????????????????????
kamsmartx is offline
Reply With Quote
View Public Profile
 
Old 04-25-2008, 02:06 PM Re: how make this
Novice Talker

Posts: 9
Name: kamsmartx
Trades: 0
up up up
kamsmartx is offline
Reply With Quote
View Public Profile
 
Old 04-25-2008, 07:37 PM Re: how make this
tamar's Avatar
Webmaster Talker

Posts: 507
Name: Tamar Weinberg
Location: New York
Trades: 0
PHP Code:
$query="SELECT * FROM pationts"
Too generic. You need to do something like

PHP Code:
$query="SELECT name FROM pationts"
especially if you're only looking for the patient name. * selects all fields in the table, and if you are getting all of them and only need one column, it won't help you. Make sure the correct column is labeled 'name' though.
tamar is offline
Reply With Quote
View Public Profile Visit tamar's homepage!
 
Reply     « Reply to how make this
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13914 seconds with 13 queries