to update drop down list value when selected from website

to update drop down list value when selected from website

hi help me, i want to insert value into db when i select from a drop down list, this is my code,

<div id="age">
Age 
<select name='NEW'>
<option value="">--- Select ---</option>
</div>
<?php

mysql_connect("localhost","root","") or die('could not connect to database' . mysql_error());
mysql_select_db("zero to three");
$select="zero to three";
if(isset($select)&& ($select!="")){
$select=$_POST['NEW'];
}
?>
<?php
$list=mysql_query("select * from age order by Age_Desc");
while($row_list=mysql_fetch_assoc($list)){
?>

<option value="<?php echo $row_list['Age_Id']; ?>"
<?php if($row_list['Age_Id']==$select){ echo "selected"; } ?>>
<?php echo $row_list['Age_Desc']; ?>
</option>
<?php
}
?>
</select>
View Answers









Related Tutorials/Questions & Answers:
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list...=mysql_query("select * from age order by Age_Desc"); while($row_list=mysql_fetch
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list...=mysql_query("select * from age order by Age_Desc"); while($row_list=mysql_fetch
Advertisements
to update drop down list value when selected from website
to update drop down list value when selected from website  hi help me, i want to insert value into db when i select from a drop down list...=mysql_query("select * from age order by Age_Desc"); while($row_list=mysql_fetch
Drop down list from database
Drop down list from database  Hi, Can I know how do we get the drop down list from database? Eg: select country--select state--select district--so... * from country"); while(rs.next()){ %> <option value="<
data should not repeat in the drop down list when it is loading dynamically from database
data should not repeat in the drop down list when it is loading dynamically... the whole department field from the data base (i.e in the drop down list... be included in the drop down list. 1)selDept.jsp: <%@page import
data should not repeat in the drop down list when it is loading dynamically from database
data should not repeat in the drop down list when it is loading dynamically from database  selDept.jsp <%@page import="java.sql.*"%>...; <option value="none">Select</option> <
data should not repeat in the drop down list when it is loading dynamically from database
data should not repeat in the drop down list when it is loading dynamically from database  selDept.jsp <%@page import="java.sql.*"%> <...' onchange="showEmp(this.value)"> <option value="none">
to access value of drop down value in beans when dropdown is populated using ajax
to access value of drop down value in beans when dropdown is populated using ajax  i want to access value of dropdown box in beans .. and this drop down was filled using ajax. plz help
view data from database using drop down list
view data from database using drop down list  hi i want to view the data from database by selecting a value in a drop down list. for an example drop down list have picture element.when click it select pictures from the database
How to send the data selected from drop down menu from html page to sql 2005 database.
How to send the data selected from drop down menu from html page to sql 2005 database.  Dear Sir, If I want to save the information provided by user from html drop down menu such as check-in date for hotel reservation
I want to display the quantity of the selected item of a drop down list in a textbox. The data is stored in database.
I want to display the quantity of the selected item of a drop down list... from database into Drop Down List. <% DataSource data = new... = con.prepareStatement("select * from library.booklist"); ResultSet result
dynamic drop down list
dynamic drop down list  I want to create 2 drop down list, where it takes value from database and the two list are dependent..means if I select a particular value from one the other list is developed accordingly..depending
jsp code for a drop down box to retrive value from database
jsp code for a drop down box to retrive value from database  my project needs to get the value from database in to the drop down box..... pls give me code for that ..... tan q   1)login.jsp: <html> <script>
validation for drop down list
validation for drop down list  Hi all I have a form, it contain 12 drop down list. Each drop down has 1 to 5 values,i need to validate this form. the following condition should be true. 1.you can choose only 3 times 5 value. 2
Dependent drop down list
dependent drop down list is used my code is successful but when i select class from first drop down list all the data get lossed means the value entered in fields before drop down list get blank.what can i do for this? This is the code
drop down list in Struts
drop down list in Struts  How to create a drop down list in Struts
how to retreive data dynamically from mysql to drop down list
how to retreive data dynamically from mysql to drop down list   sir, i created a table in mysql and i inserted some values into the table through... the data of a particular column in a table into drop down list dynamically
The code for retrieving data from database into Drop Down List.
The code for retrieving data from database into Drop Down List.  <... to MySQL"); PreparedStatement pre = con.prepareStatement("select * from...; Book List : - select - <% while
retrive the data from access database to drop down list box in jsp
retrive the data from access database to drop down list box in jsp  hai, im new to jsp now im using the jsp along with access database.in table i load all the data's i need to retrive the data from database to dropdown list box
Get values in drop down list
Get values in drop down list  Pls provide me jsp code to get values in drop down list from another table's field. my project has customer... in drop down box in front end..... pls provide me code.. thanx
Dependant & dynamic drop down list
be in this or AJAX forum. I have one dynamic drop down list from data base (working... on the values selected by user in first drop down list. How to achieve this ?   ...`));   This will select only ONE row (country) from first drop down. In my case
how to retrieve the id value itself from the access database to drop down listbox in jsp
how to retrieve the id value itself from the access database to drop down listbox in jsp  how to retrieves the id which is an int datatype, from access database to drop down list box in jsp...plz send the code for that.....plz
Drop down and radio button value on edit action
Drop down and radio button value on edit action  HI, I have a title field and a payment type field for title i have used drop down with values... i get the value from the database for title and radio button selected
How to obtain the selected data item from a list box when listbox contains objects wrapped under Arraylist?
How to obtain the selected data item from a list box when listbox contains... want to copy the selected item(one at a time) from the list box to the text box. I... and a text box. I am sending an Array List object from a servlet to this jsp
Pls provide me jsp code to get values in drop down list from another table's field....
Pls provide me jsp code to get values in drop down list from another table's... in customer registration page and should be shown in drop down box in front end... pages..... when i insert data in company registration .. it ll have company id
update the selected records from view immediatly
update the selected records from view immediatly  Hi I am extracting data form sql view to Excel(2007). I want update the Flag field (CHAR 1)in one... update the records immedialty in view as soon as see the data form view. Thank
how to make drop down list in JSF & fetch data Item from database
how to make drop down list in JSF & fetch data Item from database  how to make drop down list in JSF & fetch data Item from database
jsp login code ... when username , drop down box and password is correct
value is correct.... the drop down box values should be retrieved from database...jsp login code ... when username , drop down box and password is correct ....... the value is retrieved from database into combo box..... but the validation
displaying section in the jsp based on the sected value in drop down - Java Beginners
on the jsp based on the selected value in the drop down list using java script code...displaying section in the jsp based on the sected value in drop down  ...; Hi friend, drop dwon list using javaScript function
how to update combobx's selected value to database with respect toselected multiple checkboxes
how to update combobx's selected value to database with respect toselected... values which is selected from form1.jsp String languages=""; String box... to display records from database out.println("<tr><td>"+"<input type
store values of drop down list box in database
store values of drop down list box in database  how to store values of drop down list box in oracle database in jsp?I have information inserting form where i have date of birth as drop down list box
display table details when selecting table name in drop down liat
display table details when selecting table name in drop down liat  Hello, Am having problem in my project... i want to retrive the data from mysql... of tables from the database to the dropdown list... if i select the particular table
Select functionality of drop down list - Struts
(in struts application) in which if user select HIDE from the drop down list... have Drop down list having element Test1,Test2,Test3,HIDE and one Text msg box for entering Age,Now if user select "HIDE" from drop-down list the below text
Dependant & dynamic drop down list - Follow up
Dependant & dynamic drop down list - Follow up  Thanks for your answer. As per your answer This will select only ONE row (country) from first drop down. In my case user can choose more than one row , which is then sent to next
Java swing: get selected value from combobox
Java swing: get selected value from combobox In this tutorial, you will learn how to get selected value from combobox. The combobox provides the list... imposed an actionlistener on the combobox in order to get the selected value from
Excel Cell Drop Down List
Excel Cell Drop Down List In this section, you will learn how to validate data entered in a cell and provide a drop down list of possible values to the user... in a excel sheet's cell and also can provide drop list of possible value
Display related data in other drop down list on selecting one data in one drop down list
Display related data in other drop down list on selecting one data in one drop down list  How to display related datas in dropdown list from database on selecting one data in previous dropdownlist in Java Server Page
dynamic drop down list box - Java Beginners
dynamic drop down list box  hi all , I want to dynamically populate a drop down box from an sql query in a servlet program, using only html...(); ResultSet rs = st.executeQuery("select * from Combolist"); List ulist = new
navigation between panels when item is selected from jcombobox - Swing AWT
navigation between panels when item is selected from jcombobox  hi well i have a problem i have one main panel and on that there is one more panel(2nd panel).the combo box is in main panel. when a item is selected from combobox
how to dynamically add text boxes with add and remove link based on drop down choices, if a particular choice is selected.
how to dynamically add text boxes with add and remove link based on drop down choices, if a particular choice is selected.  how to dynamically add text boxes with add and remove link based on drop down choices, if a particular
drop down list doPost() servlet - Servlet Interview Questions
drop down list doPost() servlet  Can someone assist me HOW to invoke drop down menu list in doPost() servlet? Upon selecting and clicking a submit... the selected value (Or even multiply values) still displayed? Thanks and regards
how to set a value of dynamic number of drop down lists on a jsp page and access it value on another jsp page
,rating2......number of buks in that category(and each drop down list has value...how to set a value of dynamic number of drop down lists on a jsp page... number of drop down lists(depending upon number of books in that category) on jsp
how to import values from database to the drop down box
how to import values from database to the drop down box   hi iam... employee page i kept a drop down box for employee Ids i want all employee IDs will display in the drop down box please help me with the code
drop down
drop down  how can i add data from choice/dropdown component of java awt to myaql table
Select from drop down and load the appropriate application resource.properties in struts2
Select from drop down and load the appropriate application resource.properties in struts2  I would like to use a dropdown for selecting a language in my application .On selecting a language the appropriate
How to create a dependent drop down list using [Apache POI]
How to create a dependent drop down list using [Apache POI]  Here I.... In that two drop down list are there. Want to create a drop down list that depends..., and "rice, curd, milk" items will appear in the dependent drop down list in cell
How to create a dependent drop down list using [Apache POI]
How to create a dependent drop down list using [Apache POI]  Here I.... In that two drop down list are there. Want to create a drop down list that depends..., and "rice, curd, milk" items will appear in the dependent drop down list in cell
how to make a radiobutton selected when retrieving data from database using struts framework and spring jdbc
how to make a radiobutton selected when retrieving data from database using struts framework and spring jdbc  how to make a radio button selected when retrieving data from database using struts framework and spring jdbc
Drop Down
Drop Down  How to insert date into database using dropdown like facebook
need to update key , value pair in map from properties file
need to update key , value pair in map from properties file  I have a map with key , value pair. with key as integer and value as string datatype. I... .properties file where i will update the keys and values whenever needed. i want

Ads