Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP to update drop down list value when selected from website

Have Programming Question? Ask it here!
 
 
 


prashanth
to update drop down list value when selected from website
0 Answer(s)      a year and 4 months ago
Posted in : PHP


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>

Advertisement
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">
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
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
drop down list in Struts
drop down list in Struts  How to create a drop down list in Struts
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
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
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
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
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
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
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
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
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
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>
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
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
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
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
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
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
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
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
Excel Cell Drop Down List
the following error message : You can select the value from the drop down...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
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
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 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
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
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
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
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
drop down
drop down  how can i add data from choice/dropdown component of java awt to myaql table
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
Drop Down reload in IE
from the 2nd drop down then the 1st drop down ( which is date) automatically loads to 1 which is first value..This is the problem im facing in IE but it works...Drop Down reload in IE  Hi i was using two drop down box..One
Drop Down
Drop Down  How to insert date into database using dropdown like facebook
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
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
How to pass parameter through drop down list using session management in jsp??
How to pass parameter through drop down list using session management in jsp??  How to pass parameter through drop down list in the URL and access it on same jsp page using session management
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
drop down box - JSP-Servlet
drop down box  when i enter some letter in the input box,the corresponding words of that particular letter must be displayed below as a list from the data base in the same input box as drop down. Thanks&Regards, VijayaBabu.M
drop down menu
drop down menu  drop down menu using html
Drop down for search textbox like google search
Drop down for search textbox like google search  I want drop down like google search (ie, when we type one letter then the word start with that are displayed). when the drop down list appear, then we can select one of word as our
How to insert multiple drop down list data in single column in sql database using servlet
How to insert multiple drop down list data in single column in sql database using servlet  i want to insert date of birth of user by using separate drop down list box for year,month and day into dateofbirth column in sql server
 

 

 

DMCA.com