I've looked through the forum rather extensively and my qestion is similiar to the question by Brian_F and answer by "saintaw" a couple of days ago in this forum. I already have a functional page that has several dynamic drop-down menus from which the user selects a topic of interest.
My question is how to reference their choice from the drop down menus in order to display the results of their choice. I would like the user to be able to choose a subcategory with one of the drop down menus and then be able to view the questions related to that subcategory.
I currently have a nested for loop which displays the categories and subsequent drop-down menus for each category, and I'm using PHP and MySQL to do the dirty work. code:
I am trying to build a database system to keep track of busdrivers and how much this company owes them. So what I have done is I have made 3 tables. One for the driver and info like name, address, city etc.
number 2 table with sales info etc. and the third = more slaes info. So what I am trying to figure out is how on lets say forms to be able to choose the driver and add sales info to it? So here are my tables: Code:
I am developing an on-line booking system, and am designing a script which creates a booking "area". An area has the following fields:
Area Name Day start time (the time of day bookings can begin e.g 9 AM) Booking Time Slot (the length of time for each time slot e.g 30 mins) Day Finish Time (the time of day bookings must finish e.g 6 PM)
What i require is a method for locking down the users input so that the finish time is a list that is created that is divisable by the number of minutes used for a booking time slot . e.g. if the start time is 9 am and each booking time slot is 30 minutes, then the user must select a finish time which is divisable by 30 i.e. either on the hour or half past.
I have looked at several methods for doing this but cannot decide what would be suitable. Ideally I want the user to be able to select the start time from a dropdown (static html would do) the select a booking time slot (again a static html dropdown would surfice) and then a dynamic dropdown be created with a list of Day Finish Times.
My questions are these:
We would lke to have two drop down boxes on a search page. for example one drop down will contain light bulb wattages( ie 40, 50, 60) and the other drop down will contain type of bulb ( round, oval, twisty etc.). These drop down boxes would be hard coded. no need to change them.
how would we concantenate the two drop down boxes. ie. if someone chooses "50" and "twisty" the result would be one field that would contain "50 twisty". how do we do this. Then we need to use this new field to search the database and extract all the prodcuts that meet the criteria.
I'm very new to the PHP world and I'm trying to create two Drop Down Menus that are linked. For example if the first drop down menu had all the States listed and the other drop down would show all the cities to choose from once a State was selected in first menu narrowing the list. Hope this makes sense and I hope the solution is simple at this point of my education level.
i am trying to do is the following: I have a MySQL database that (very simplified) has a schema like this 'Students(Name, id, Course)' I would like to have a form on a web site that has 2 linked drop down menus, one 'Please select id' and one 'Please select course'. When a user of the site selects there Id from the first drop down menu, i want the second drop down menu to populate itself with the courses held in the database for the given users Id. I would like the first drop down menu to be populated from the database with a query similar to 'SELECT id FROM students'.
I currently have two checkboxes(test and phase). What I am trying to do is if a checkbox is checked, a drop down menu will appear with the appropriate information. For example, if the test checkbox was selected, testA and testB would appear in menu. if the user also checks off the phase box, then the phases of the selected test will appear in another drop down menu. However, if the user only selects the phase checkbox, then all five phases will appear in the drop down menu. Anyone have any idea how to go about this?
I have a drop down menu and I'm trying to find out which option they have pressed. I need to use the $_POST method to do this. Below is what i've written so far, but it's showing every time the messages:
"You don't have enough points" AND "you gained blah blah exp" I've blocked out some of the stuff that calls up files and stuff, just for security reasons Code:
I select a client from the first drop down menu, then a list of events for that client is shown in the second drop down menu. I then want to select the event from the second drop down and automatically go to a form I built "editevent.php3" showing information echoed from mySQL for that event. I have started the code, but know it is not complete. Code:
I need to add some data from drop down menus into a database. The form loops on itself to add the data. I'm not sure which part I need to add the dollar too, i.e. the select name or the values in the list, in order to make it work. I've included part of the code below:
$form.="Cateory 1*: <select name="cat"> "; Â Â Â Â $form.="<option value="Action">Action</option> <option value="Comedy">Comedy</option>"; Â Â Â Â $form.="<option value="Drama">Drama</option> <option value="Family">Family</option>"; Â Â Â Â $form.="<option value="Horror">Horror</option> <option value="Misc">Misc</option>"; Â Â Â Â $form.="</select>
I am building a search page. There are 5 drop downs from which the user can select search filters. However, some of the drop down list selections will invoke a sub-list.
I am currently trying to put together a query that searches a table of job vacancies in my database for any records that meet five criteria selected by the user from drop down menus. Certain jobs can be located in multiple locations and so in the table structure I have fields for location like this;
and a value of 1 or 0 is assigned to each field depending on whether it is true or false for that job. Now the code allowing the user to make a location choice looks like this:
My problem is that I can't for the life of me figure out how to translate the choice selected by the user into an SQL query that would give me the data I needed. Perhaps I need to rethink my database structure, I'm not sure.
I have a question about PHP and drop down menus. Should I be using PHP for my drop down menus or should I be using java script? I have a whole contact form that is programmed in PHP, but I have never done a drop down menu with PHP, is this possible? If anyone knows of any great drop down menu tutorials in PHP.
I know how to insert a date by filling in a field but I don't know how to do it using a drop down menu. One menu being month, another the day and the last the year. Any code snipplets I can disect and play with or tutorials on this?
I'm looking to create drop down boxes for a user to select the date and then have it insert what they select for month, day, year, hour, minutes and insert it into mysql. It needs to be organized in a timestamp like so: 2007-02-28 21:06:40
I've created the drop down boxes and it works pretty well: Code:
I have categories which contain sub categories which contain other sub categories etc etc....
Ive got a drop down which shows the first lot of categories, then another drop down displaying the sub categories depending on what the user clicked in the first place. Then another displaying the next set of sub categories depending on what they chose in the second drop down etc. Code:
Essentially I want the user to be able to do what they are doing in the first row over and over again.
i have a form that uses the post function however i am having some troble getting information from the drop down menus. and also i am having some trouble doing some form validation. the code for both files is shown
below.<html><title>Create a new Prequisite Rule </title> <body> <form action="insert_rule.php" method="post"> Rule Label: <input type="text" name="rulelabel" /></p> <p> Rule Description: [Code]....
this is the php file that handles the data that is collected from the file. right now as it stands i am able to get all the variables except those from the drop down menus and also i want to write some code that checks the the course is of a higher level number than the perquisite course however if it is the same then the semester number of the course must be higher that than that of the prerequisite course. that is what i was trying to do with lines 19-39 but continually getting an error that was referring to line 39[/QUOTE]
I am attempting to create an update form where the current fields in the table are populated into input boxes and then can be altered where necessary.
I was wondering if it is possible to pre check radio buttons, check boxes and pre populate drop down menus based on the results currently in the table. eg. if the gender of a person is male then the radio button will be pre checked as male. How would this be done.?
I frequently work with forms where menus are pulled from a database. When a user enters data in the form and then saves it, if it is retrieved later, the form shows the saved data, including the drop-down menus.
The way I normally do this in php is to first retrieve the data for the saved from. Then I create the menus and within the loop of creating the menus I simply add the word "selected" into the results row which equals the saved option on the form. Code:
I have a shopping cart script that I am trying to modify to support multiple product selection. As it is now, the customer can select a product from a single drop down menu. Now, I would like to add multiple dropdown menus (all populated with the same options).
I'm looking for a way to build a dynamic menu systems. I have a project that I have under way that will help you spec a computer system. I will be using drop down (select) menus, and I wanted to know if its possible that if you select one option that it would remove certain options from the next menu as they would be incompatable with what was selected above.
Firstly I am a fairly recent newbie to PHP & MYSQL but I am catching on pretty well. I would like to use them to build a dynamic menu system for a catalog type website.
I have several 'category' names that can change. I would like to recall the category names from the database and use them to build a set of menu 'buttons'. When a button is pressed, I would like to assign & pass a variable (the category actually) back to another php script that searches the database for all items in that category and builds a display page.
I have most of it figured out except the part about how I can construct the menu so I assign & pass a different variable out of the menu when each button is pressed.