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:
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> <
Advertisements
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">
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
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
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
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
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
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
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
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
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 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
drop down  how can i add data from choice/dropdown component of java awt to myaql table
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 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
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
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
Drop down menu
Drop down menu  I have drop down list of some 14 links which links to the table,If i click each link the table should display below the link and again if i click the link the table should not appear. please help me
Drop down menu
Drop down menu  I have created a drop down list of links which links to a table but if i click the link the table display in the other page i want to display it in the same page.Please tell me the solution
Drop Down Box
Drop Down Box  In a Drop Down box I want to show the user All the Country In the World. And when he type A-z,then each of the type Show those country which start with those word. Like I For-India
dynamic drop down
dynamic drop down   I have created 2 drop downs in jsp.1... on the selected department, respective designation should dynamically bind into the designation drop down (use jsp+javascript+servlet) reply soon   1
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
Drop down combos
Drop down combos  Hi.. How to write a javascript for linked combo... = document.createElement("option"); option.setAttribute('value',i+1); option.innerHTML...="combo1" onchange="change(this);"> <option value="0">-Select-</option>
jsp drop down without refresh - JSP-Servlet
jsp drop down without refresh  Sir I have tried two depenedent jsp dropdown in jsp page,But the probleam is when i select first drop down its totaly reload the page and selected item is vanish, Similirally when i used 2nd
drop down php mysql - PHP
drop down php mysql  PHP Script required to show the similar drop down item in each menu without refreshing the page. Is it possible if yes how
help to select a value from the dropdown list
from the drop down list created in a div and put it in the textbox kim...help to select a value from the dropdown list  I have a html file... <input type="text" size="30" name="inputString" value="" id="inputString
jsp drop down-- select Option
jsp drop down-- select Option  how to get drop down populated... code populate the second dropdown on selecting the value from the first...;nbsp;</td> <select name="sel"><option value=""><---Select
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
Drag and Drop components from one frame to another frame
that how to drag and drop component (drop down list, text area, check box, radio... Drag and Drop components from one frame to another frame...;One frame has five component, user can drag and drop component from one
Display JList value selected from the JOptionPane
Display JList value selected from the JOptionPane In this section, we are going to select the particular value from the JOptionPane combobox and displayed... value 'Tennis' will get displayed on the list
Update value
Update value  How to update value of database using hibernate ?   Hi Samar, With the help of this code, you will see how can update database using hibernate. package net.roseindia.DAO; import
Drop-down text selection in jsp/html
Drop-down text selection in jsp/html  Hi, I am trying to create JSP.... Now the first dropdown will have all the values. The second drop-down depends upon... such dynamic dropdowns. Also based on the values selected in the drop-downs, I should
html menu button drop down
html menu button drop down  How to create a menu button in HTML?   <select id="category"> <option value="1">One</option> <option value="2">Two</option> </select> <select id
jQuery Drop Down Menu
jQuery Drop Down Menu       In this JQuery tutorial we will develop a program  to make Drop Down menu Steps to develop the Drop Down menu . Step 1:         Create
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
dependent drop down box - JSP-Servlet
dependent drop down box  haloo sir Please give me the solution how to extract data from dependent drop down box with page refresh...; window.location.replace("http://localhost:8080/examples/jsp/dependentDropdown.jsp?id="+cid+"&&value
Retriving value from dropdown list nad disply it in other page
of the selected value from the dropdown list and dispaly it to on the next page. i...Retriving value from dropdown list nad disply it in other page  Hello, I have a dropdownbox on my webpage and a map which contains a marker
Jkmegamenu drop downs moving left when window is resized in Chrome
is resized the drop down divs move left. I got the JavaScript code from this link...Jkmegamenu drop downs moving left when window is resized in Chrome  I'm using the JKmegamenu plugin to implement a megamenu on a website I'm working
Drag and Drop between two list control in Flex4
Drag and Drop between two list control in Flex4: In this example you can see how the data items of list are drag and drop from one list to another list... and drop between two list control" chromeColor="#555555"
jQuery Simple Drop Down Menu
jQuery Simple Drop Down Menu In this section, you will learn how to develop a simple drop down menu using jQuery. To develop a drop down menu we put...;title>jQuery Simple Drop Down Menu</title> <meta name="keywords"
creation of drop down menu using ajax in java - Ajax
creation of drop down menu using ajax in java  Hi, Here I want to create a drop down menu using ajax in ofbiz framework. I want to fetch the data from database.I got examples using asp.net and php but I am not getting
How do i retain values in the drop down - Struts
How do i retain values in the drop down  Hi, I have a jsp page... with the drop down. My problem is whenever i do this the values in the drop down... in the drop
Add values of drop down menu( select option) to mysql table
Add values of drop down menu( select option) to mysql table   Here...;option value="ON">ON'; echo '</option>'; echo '<option value="OFF">OFF'; echo '</option>'; echo '</select>'; ?>
Advertisements
 

 

 

DMCA.com