Stuck On Dropdown Menu List, Could Use Some Guidence
I have a form with some drop down list/menus. I do a check for ommissions and if found display a message to re-try. What I need is a way to show which options where chosen when the user submitted the form the first time.
If someone could show me how to do the first one, I'm sure it's the same process for the second one. Here's the code:
View Complete Forum Thread with Replies
Related Forum Messages:
Trying To Create Dropdown Menu From List
I am trying to create a dynamic dropdown select menu from a directory containing other directories and files. This is to select a certain page from the list so I can edit it. I only want the files in the menu. Here's what I have so far but it doesn't populate the dropdown. Code:
View Replies !
[PEAR:QuickForm] Dynamically Change A Dropdown Menu According To Another Menu?
I've been using QuickForm for a few months now and I am now given a new challenge: I've got a search form with a dozen of dropdown menus, the first dropdown menu being "Brand". If you select either Brand A, B, C, D... Z, the second dropdown menu "Model" must be dynamically changed to model AA, AB, AC, AD..., according to the models manufactured by the brand selected in the first box. I've seen that done on quite a few sites, but never found if QuickForm had a quick & clean way of doing that.
View Replies !
Chain Menu But The Menu Should Be Multiple Select Menu/list
I am looking for codes to be able to do the same thing with multiple select menu/list. PHP codes or javascripts codes are both fine. 1) javascript + php approach: Prefer to be javascripts codes to display the chain menu. I can use the php to get the all three levels menu data from the database, and assign these values to the javascript. 2) php codes only: Or use the pure php codes (the problem is if just using php codes then I have to submit the form to the server every time, when top level menu select changes to create new menu.).
View Replies !
Dropdown Menu
i seem to be having some problems on finding how this ajax drop down menu i seen at Anime-Eden.com. it has a nice effect on how it appears. Now i am familar on how PLAIN drop down menu works, but not how this works.
View Replies !
Use A Dropdown Menu
I have a list of contacts which are sorted by name. I was hoping to create a dropdown menu in which someone can sort the list of contacts by office, city, state, and contact type. Is this possible? (I am sure it is, but I am not sure what the concept is called so I may research how to do it).
View Replies !
Advanced Dropdown Menu
I want to populate a dropdown menu with countries that are in one column of my table. I know how to do that, but I can't find how to eliminate multiple items. Some countries appear several times in different rows, but I only want each available country to be shown once in my dropdown list.
View Replies !
Mysql / Dropdown Menu
what i am trying to do is to make a system with a few input pages and edit and read pages.. so right now i got the input/edit/read pages working. (yay) But now I want to have on 1 input page a dropdown menu that reads its information from the database. and that if i go to the page i can select a value out of the db and submit that inside my form and that it reminds the value if i view or edit the page. So what i got now is a little system that is able to add/remove/edit a value inside a field called "drop01" Well now i got a other input page called "input01.php" inside this script i want to have the dropdown menu that reads its values from the "drop01" field. PHP Code:
View Replies !
Autoselecting A Value In A Dropdown Menu
I'm revamping my sites administration panel and I put in a dropdown menu to select the section to administrate (it was a LOT better than the list of links I had before, I'll probably update it some more though) and I want to know how I can autoselect whatever page I'm on in the dropdown menu, for example, here's the menu: Code:
View Replies !
Dynamic Dropdown Menu
with help from the PHP Gurus here, I have a dynamic menu script: PHP Code: <?php $time = time() + 28800; $time_plus2 = strtotime('+ 6 days'); echo '<select name="select">' while ($time <= $time_plus2) { Â Â Â Â echo '<option value=>' . date('l, F d', $time) . '</option>' Â Â Â Â $time = strtotime(date('Y-m-d', $time) . ' + 1 day'); } echo '</select>' ?> how do I now get the days of the week to link to different pages?
View Replies !
Populating Dropdown Menu From Db
Okay, I am trying to populate a drop down menu with items from a table in my db. I have a table called "teacher" which has the following info: I use the following code to grab the info from the teacher table. Code:
View Replies !
Dropdown Menu Updates
I have seen this on lot of sites, where say you goto a car site, and you click the make of the car from a drop down menu, and than after u click it, it will load up the appropriate models for that make.
View Replies !
2 Questions. Dropdown Menu And # Of Rows.
1. I have a table named pics and a column named name, just to let you know for use. I want to take the data from each row in the name column and insert it into a dropdown menu. I know how I could do it, but I would have to go: Code: <SELECT NAME="name" SIZE="1"> <OPTION SELECTED><?php $name[10 ?> <OPTION><?php $name[1] ?> <OPTION><?php $name[2] ?> <OPTION><?php $name[3] ?> <OPTION><?php $name[4] ?> <OPTION><?php $name[5] ?> <OPTION><?php $name[6] ?> </SELECT> but then I could make too many or too less. I want it to automatically adjust to the number of rows. 2.What is the code needed to find out how many rows are in a table?
View Replies !
Unwanted URLs In URL Dropdown Menu
I'm working on a PHP script and it has a user login, and the variables (username, password, id number) are passed via the URL bar. Is it possible to somehow not allow the visited page show up in the dropdown list of URLs in the browser? The problem is that people can view the list and easily see people's usernames and passwords. Example: http://www.somesite.com?username=john&password=12345 What I only want is: http://www.somesite.com/ I know that Hotmail.com doesn't show all of the pages that have been visited, all it shows in the list is hotmail.com, so I think it is possible to do this, but I don't know how.
View Replies !
Make A Dropdown-menu Filter?
I have a dropdown menu which is supposed to filter a table to show results for professionals, students or all. But I don't really know what I'm doing. This is what I have so far. Code: Initially, I was able to filter for students or professionals, but since trying to have an all option (students and professionals) it has gone to pot, and I keep getting errors. I know that my quotation marks are not right, but I can't think of a solution. I would be more than happy to see any ideas, even if they are completely different to mine!
View Replies !
Dropdown Menu <selected Name="...
I have a dropdown menu like this one: <select name="country" tabindex="6" id="select_country"> <option value="">- Country List -</option> <?php $query = "SELECT * FROM country ORDER BY country ASC"; $result = mysql_query($query) or die('Error, query failed'); while ($row = mysql_fetch_array ($result)) { $country = $row['country']; ?> <option value="<?php echo $country ?>"><?php echo $country ?></option> After I have selected one country and I hit the submit button it go back to the default value in the box, what I want is to show the selected value in box until I selected another value. If the default value is Australia when I start this page, I then select USA and hit the submit button it reset to the default value "Australia", but I want it to show USA as long I not select anything else. I have tried to use session in selected="<?php echo $_SESSION['country']; ?>" but it didnt work.
View Replies !
Selecting Item In Dropdown Menu
Im having problems trying to select a specific option in the drop down menu which has been populated with a list pulled from the 'category' table in the db. The option that needs to be selected is pulled from an id in a 'item' table, relating to the aformentioned category table.
View Replies !
Dynamic Dropdown Menu Glitch
I wrote this code to dynamically generate an array from files on my server and put it into a drop down menu, but the code cannot be inserted on any page anywhere without it cancelling the loading of the rest of the page. Any ideas? Here is the code: PHP Code: <? $the_array = Array(); $handle = opendir('walrus/strips/.'); while (false !== ($file = readdir($handle))) { Â Â Â if ($file != "." && $file != "..") { $file = substr($file, 0, -4); $the_array[] = $file; Â Â Â } } closedir($handle); asort ($the_array); reset ($the_array);.....
View Replies !
Network Bar, Dynamic, Dropdown Menu
Basically I have a "network bar" that I place on the top of all my sites, which has a dropdown menu box to interlink all my other sites. Basically I would like to really modify this idea out more. Code:
View Replies !
Tree View Dropdown Menu
I have such a categories MySQL table: ID | name | parent and have such a function that displays the categories in a SELECT element as a drop-down menu: function DD_ProjectCategories($parent=0) { include("db.php"); $query = "SELECT ID,name FROM categories"; $result = mysql_query($query) or die(mysql_error()); echo '<select name="parentcategory">' echo '<option value="">Choose a parent category</option>' echo '<option value="0">Root Category</option>' while ($row = mysql_fetch_array($result)) { echo "<option value="$row[0]""; if ($parent == $row[0]) {echo " selected"; } echo ">$row[1]</option>"; } echo "</select>"; unset($query,$result,$row); }.....
View Replies !
How To Pass The Value Of Selected Dropdown Menu To Another File?
there is a php-myql script that list the mysql databases in the drop-down menu, use wil select one and the submit button should pass the value or variable $db_name to the test.php, this script list the databases in the drop-down menu but when i select one and then click on submit cannot pass the db_name to the test.php:
View Replies !
Duplicates In A Dropdown Menu Populated From My Database
I've been searching to figure out how not to have duplicates in a dropdown menu populated from my database. This is what I have, but how do I change it to get rid of duplicates. <?php $result = mysql_query("SELECT City FROM residential order by City"); echo "<select MULTIPLE NAME="City_code">"; while($row = mysql_fetch_array($result)){ echo "<option name="City" value="$row[City]">$row[City]</option>"; } ?> </select>
View Replies !
Pagination And Dropdown Menu Used In Searching Mysql
I am working on building a database made for searching. I have a text search and a dropdown box used for searching different table collumns (lets people search for certan criteria). I have that working correctly. I also only want to show 25 results per page. I have that working correctly. My problem is that when I combine the two it breaks the code. The pagination works fine without the dropdown and vice versa. I think it is due to the variable that is being used to choose the collumn in the sql query. Code:
View Replies !
Choose From A Dropdown Menu Of Encryption/decryption Cyphers
I've written a php page which allows users to type in a text string and a key, then choose from a dropdown menu of encryption/decryption cyphers, and a method (encrypt, decrypt). The whole thing works, except the mcrypt command doesn't work. here is my mcrypt command: if ($method == 0) { //Encrypt $output = mcrypt_ecb ($algorithm, $key, $input, MCRYPT_ENCRYPT); } else { //Decrypt $output = mcrypt_ecb ($algorithm, $key, $input, MCRYPT_DECRYPT); } Here's a list of what the variables may be: $algorithm = MCRYPT_3DES $key = "plain text" $input = "more plain text"
View Replies !
Dropdown List
I have a Dropdown list with Select with 1, 2, 3, 4, after select on of them it bust to refresh the page to what you select but it don't do it. PHP Code:
View Replies !
Dropdown List Box
I am able to populate data in a dropdown list box using php and mysql. However, I a wondering if i can add inside some icons such as close or More records, where the drop down acts to the specified request, ie., closing the drop down or fetching some more data from backend.
View Replies !
Populating Dropdown List
I am wanting to know how to populate the <SELECT> dropdown menu with all existing values from the DB and also have the value associated with that id selected. This is an updating area of my admin. Any ideas? Here's the code so far. At the moment it only retrieves the value assigned to that id. PHP Code:
View Replies !
Smarter Way Of Doing Dropdown List?
I've got a dropdown list that is acting as a filter on a table, so the user can select a value and the page is reloaded only showing the matching values from the database. Now when the page reloads the dropdown was set to 'all' as it was first in the list, even if I'd selected a different value, this was confusing for users, so I added an initial <option> field which pulled the correct value from $_GET (code below) - however this is a little odd as it means the value appears twice! Does anyone have a genius solution to this? I've seen a <select selected="yes"> sort of thing around, but I don't know how I can tell the php to add this value dynamically? <select size='1' name='occupation'> <option>".$_GET['occupation']."</option> <option value='All'>All</option> <option value='Student'>Students</a></option> <option value='Professional'>Professional</option> <option value='Hobbyist'>Hobbyists</option> </select>
View Replies !
Mysql Dropdown List
Im trying to automatically fill a dropdown list with data from MYSQL table. Sizes Table -------- ProductId | size1 | size2 | size3 | size4 | size4 | size6 | * the 'size' rows hold a numeric value for the quantity I have of each I was hoping to only list the sizes that have a greater number than 0. I have used an auto fill select code on another project but I'm just not sure how to fill in the blanks. Code:
View Replies !
Check The Dropdown List
i have a drop down list in my php code. i need to check the drop down list is set or not. for that what is the code. i heard that there is no php code for that. javascript is needed. my code is here. PHP Code: <?php $database="sms";                    /* DB name       */ $host="localhost"; $user="root";                        /* Set DB Username */ $pass="";                            /* Set DB password*/ mysql_pconnect($host,$user,$pass);  /* DB connect....*/ mysql_connect ($host,$user,$pass); mysql_select_db($database) or die( "Unable to select database"); /*DB Select*/ function orgresult() .......
View Replies !
Add Variables To Dropdown List
I have a list of variables: $variable[0] $variable[1] $variable[2] The amount of variables changes so i've used $total = count($variable) to find the amount there are. How would i tell php to create a dropdown menu with the amount of options=$total and then fill the options with $variable[0] etc. I know i can use a loop to increase the value of say $i by one each time to that i can use $variable[$i] each time, i'm just stuck with adding the whole thing to a dropdown menu with the right number of option...
View Replies !
Autopopulate Dropdown List From Database
An events-registration page with a form containing a dropdown list for upcoming events, the events will be pulled from a table which is updated by...? what i've gathered so far is that this can be done with PHP. I am a little unclear on the concept of how this is done. How does the updated information get input into the table? 1) can this be done (updating database) through a web interface by the client, or is it something i would have to do locally and then upload. If done by the client, can he delete/edit existing information--assuming he is not familiar with code. 2) what other things aside from html(good), sql(so-so), and php(newb) will i have to know? i've seen a lot of good tutorials here and will have access to the necessary software. I just want to know if there is anything else i should know before i dive in head first without testing the PHP water, which i assume is frigid.
View Replies !
Dropdown List Of Files In Folder
I am preparing a form that includes a drop-down list consisting of the names of files in a certain folder on the server. I only need to trap the file name (jpg), not the path and I'm not trying to upload the files or anything - simply allow the user to select one of a number of different image files (they're actually location maps).
View Replies !
Dropdown List - Trying To Get Default Populated From Db.
Nooby question but when I try and get this to work (it should identify which rows in the database have GK, MID, DEF, FWD against them and then put SELECTED into the option value to give a default of what the entry is currently) it just adds SELECTED to all the results as if $row["Position"] is returning true against all four conditions? What am I doing wrong? CODE:..
View Replies !
Cascade Dropdown Or Conditional List
I would like to create a conditional cascade form. based on the selection, it can display or not display an input form for the user to enter an string of text. then at the bottom of the page (or when a user submit) connect all the sections including the input field all together (it's like a story maker?)
View Replies !
Microsoft Access Dropdown List
l am building a new site using PHP which has a lot of pages pulling from an Access Database. I would like to have a dropdown list that pulls exhibitions from the database and then when the user selects one it shows the rest of the details from DB just below the dropdown list, hope that makes sense. Code:
View Replies !
Dropdown List Selected By Default?
Does any one know how to have an item in the dropdown list selected by default? $city_field = HTML_QuickForm::createElement('autocomplete', 'city', 'City', $cities); $cities is an array of city names and I would like, say 'Los Angeles' selected by default.
View Replies !
Dropdown List - Insert Into Mysql
I simply want to add a dropdown list where, when an option is selected, its value will be inserted into a dbase table. More specifically, asume there is a page where the user sees his order. He will be able to select the order status (pending or delivered). So, for example, if his ordered is deleivered, by selecting "delivered" option, "delivered" will be inserted into the 'Status' column. Code:
View Replies !
Auto Fill Dropdown List Error
Im using the code below to autofill a dropdown list from my MYSQL DB. The only problem is it is leaving out the first entry (alphabetically) for each $vehicle_make ? Does anyone know why this may be hapenning? Code:
View Replies !
Auto Fill Date Dropdown List
How would I modify this code to display the years in the dropdown list like so: current year 2006 2005 back 50 years <select name="year" id="year"> <?PHP for($i=date("Y"); $i<=date("Y")+2; $i++) if($year == $i) echo "<option value='$i' selected>$i</option>"; else echo "<option value='$i'>$i</option>"; ?> </select>
View Replies !
Creates A Dropdown List Of Information Belonging To That User.
I have a page that uses php to look up specific fields in a specific table of a specific database based on the username. Using this, it creates a dropdown list of information belonging to that user. The fields in question each have 13 pieces of data. Based on what they click in the dropdown box, I need that specific data to pass onto hidden fields on the page. Code:
View Replies !
|