Dropdown Menus in databases
Posted by: ryuragnas (---.vic.westnet.com.au)
Date: December 29, 2006 03:43AM

Is there a way to create a drop down menu from a text field? As I would like to implement it if there is...

Thanks for any help.

Options: ReplyQuote
Re: Dropdown Menus in databases
Posted by: SkY (---.cache.maxonline.com.sg)
Date: December 30, 2006 11:00AM

Do you mean you want the drop down menu display information from MySQL database ?
You can do it by PHP, if you not sure how you can get helps from [phpfreaks.com]

Regards,
SkY

Options: ReplyQuote
Re: Dropdown Menus in databases
Posted by: ryuragnas (---.vic.westnet.com.au)
Date: January 02, 2007 12:26AM

Could you please give me a direct link? Cause I did a search of the forums and it came up with nothing...

Options: ReplyQuote
Re: Dropdown Menus in databases
Posted by: Ritika (117.201.180.---)
Date: August 31, 2014 02:02PM

in my php form on click of Edit link i have this script, and i am unable to fetch the default value of state in my form on click of "edit" link.

<div id="center-column">
<script type="text/javascript" src="countries.js"></script>
<script language="javascript">print_country("country"winking smiley; </script>
<div class="top-bar">
<h1>Edit Patients Details</h1>

</div><br />
<div class="select-bar"> </div>
<?php
@$p_id= $_GET['p_id'];
include("include/connection.php"winking smiley ;
$select= "select * from p_registration where id='$p_id'";
$data= mysql_query($select);
$row= mysql_fetch_array($data);

@$fnm.='<td>'. '<input type="text" name="fname" value="'.$row['fname'].'"/>'.'</td>';

@$lnm.='<td>'.'<input type="text" name="fname" value="'.$row['lname'].'"/>'.'</td>';

@$country.='<td>'.'<select onchange="print_state('."state".',this.selectedIndex);" id="country" name ="country" style="width:57%;" required>

</select>'.'

<br />'.'</td>';

@$state.='<td>'.'<select name ="state" id ="state" style="width:57%;" required></select>'.'<script language="javascript">print_country("country"winking smiley ; </script>'.'</td>';

echo '
<table style="font-size:14px; border: 5px solid #FF6600;" cellspacing="11px">
<tbody>
<tr>
<td><b>First Name</td>'.$fnm .'
</tr>
<tr>
<td><b>Last Name</td>'.$lnm .'
</tr>

<tr>
<td><b>Country</td>'.$country .'
</tr>

<tr>
<td><b>State</td>'.$state .'
</tr>

</tbody>
</table>';

?>



</div>

Options: ReplyQuote
Re: Dropdown Menus in databases
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: August 31, 2014 02:15PM

I am sorry Ritika, but this is not a How to Code in PHP site. Its for people that are having probems getting WAMPServer working. Once that is running you will need to get PHP coding help somewhere else. Can I suggest Stackoverflow.com

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Dropdown Menus in databases
Posted by: Ritika (117.201.180.---)
Date: August 31, 2014 02:23PM

Sure.. No problem.

Thanx for the suggestion..

Options: ReplyQuote


Sorry, only registered users may post in this forum.