beastylad Posted March 20, 2012 Share Posted March 20, 2012 Hi have a dropbox in php and it works fine btu i want the data selected to go into a textbox: Current Drop Box <?php $sql = mysql_query("SELECT * FROM favourite_destinations WHERE User_ID =$userid"); while($row = mysql_fetch_array($sql)){ $uid = $row["User_ID"]; $username = $row["Name"]; echo '<option value="'.$uid.'">'.$username.'</option>' ; } ?> name="Customer_Destination" is the name of the textbox I know in javascript u can have a onchange="document.theform.Customer_Destination.value=this.value" but the drop box stops working when i put this into the select tag name outside of the Php any help how i coudl achive this ? Link to comment https://forums.phpfreaks.com/topic/259356-inserting-data-from-a-dropbox-intoa-textbox/ Share on other sites More sharing options...
Muddy_Funster Posted March 20, 2012 Share Posted March 20, 2012 this isn't something you can do with PHP Link to comment https://forums.phpfreaks.com/topic/259356-inserting-data-from-a-dropbox-intoa-textbox/#findComment-1329551 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.