Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Monday, May 30, 2016

Set name to dropdownlist from database?

Set name to dropdownlist from database?


I have a problem with my dropdownlist. When i press something in the dropdown then it will fill my table which I don't show here. But what I want is that the dropdown has to save the thing i pressed and give himself that name. I don't really know how to do this.

Look at this how to hold a selected list value after clicking go button?.

My code:

Answer by Pranav Kumar for Set name to dropdownlist from database?


If you want to give a name to the dropdownlist. This is what I understood based on the above comments.

   

Answer by Ruchish Parikh for Set name to dropdownlist from database?


From your comment i understood that you want selected dropdown option value with onchange() event.

function check(val)  {  	alert(val);  }

Answer by sasikaran for Set name to dropdownlist from database?


Please try this

Answer by Anissa Edwita for Set name to dropdownlist from database?


Hope this works for you

Answer by Brijal Savaliya for Set name to dropdownlist from database?


Use below code

  
" . $selectedValue . ""; ?>

In your code :

$resultName = $con->query("SELECT * FROM ond");  $output="";  while($row = $resultName->fetch_assoc())  {      $output .= '';  }  


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.