Dependant Listboxes
I have a page with 3 combo box that contains rows from an oracle database. What I want to do, is to make those list dependant one from another. Let say that I have the combo boxes on a page1.php, then on change the first list box, reload the page1.php and make the selection of the second listbox,...
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dynamically Populating Listboxes Based On Previous Selection
How do I populate the second listbox in this form based on the selection of the first listbox? The first listbox is populated by this query: $year_query = "SELECT distinct year FROM bench_data"; The second listbox should essentially be populated by this: $industry_query = "SELECT distinct comp_desc FROM comp_desc, benc_data where $_POST['year']=bench_data.year and bench_data.comp_key=comp_desc.comp_key"; I know this is alot to ask, but please EXPLAIN the code. I am new and need the explanation elucidated and not just supplied code that will accomplish the goal. Code:
Write To A Page Dependant On Tick Box Value
what im trying to do is write something to a page dependant on what box's are ticked i know how to write to a page using fopen & fwrite but i dont know how to make it dependant on the tick boxes:
Having Dependant Form Fields (comboboxes) From Each Other?
I am currently programming on a form with 2 combo-boxes for input. But I need the box 2 output be dependand on box 1 input. I will explain in more detail: I have a SQL table that has 3 columns. One for type, second for motor and third for defining. By PHP I have output all types (cars and bikes) in the first combobox. Now what I need is, how can I manage, that when a person chooses e.g. in box1 Mercedes (which is defined in the 3rd sql column as a car) it would only show in the combo-box 2 of my form those motors that fit a car WITHOUT reloading? I kinda simplified things here a little, but what I described above is the main problem I have. Somehow it must be possible through javascript I guess to check the value in combobox1 get the 3rd columns value of the mySQL table probably by PHP before, and then check IF that value is car then show only certain motors and IF that value is bike show other motors.
Caching Dynamic Pages Dependant On User Status
I am new to caching dynamic pages. All I knew was how to avoid caching. My dynamic pages have on top of them an html header which shows the status of the user logged/not logged. I would like to cache the pages and force re-cache if there is a change in the user's status. I guess the must-revalidate has to be always present. I use a last modified date which comes form my database. I think Cache-Control: must-revalidate depends on the last modified date... am I right? Should I change that modified date to the time the user logs off or on? Is it ethical checking the user agent for bots? When dealing with bots should use the real last modified date.
Month Selection Dependant On Current Month
Basically I'm using a combo box to allow a user to select a month to see accounts stats for that month, so at the moment I am using the script below which will display all months up 1 less month than the current month (as obviously months after this do not have account details yet) However I want to allow the user to have a full 12 months to select from so if the current month was Feb 06 they could see Feb05, march05,April05.... up to Jan06... PHP Code:
|