|
|
|
|
![]() ![]() |
Aug 29 2007, 11:36 AM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 2 Joined: 28-August 07 Member No.: 48,966 |
Hi everyone
I was wondering if anyone could help. I want to create a page with multiple drop down lists and depending what the user selects decides the page they will be taken to. Sorry i havent explained this too well. Here is an example of what i want (link below) the user is also emailed a copy http://www.dermalogica.com/SpeedMappingOnl...US®ion=B I have searched the web and come close but nothing does it right I would be extremely greatful if anyone could help! Thanks |
|
|
|
Aug 29 2007, 04:33 PM
Post
#2
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,077 Joined: 24-July 05 From: Linix, DOS and Windows…the good, the bad and the ugly Member No.: 9,787 ![]() |
He is a script which works with dates and pull-downs.
If you have some php skill, you might be able to re-work it to generate the anchor tags for your site. CODE <?php # Script 3.12 - dateform.php (2nd version after Script 3.7) $page_title = 'Calendar Form'; // This function makes three pull-down menus for the months, days, and years. function make_calendar_pulldowns($m = NULL, $d = NULL, $y = NULL) { // Make the months array. $months = array (1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); // Make the months pull-down menu. echo '<select name="month">'; foreach ($months as $key => $value) { echo "<option value=\"$key\""; if ($key == $m) { // Preselect. echo ' selected="selected"'; } echo ">$value</option>\n"; } echo '</select>'; // Make the days pull-down menu. echo '<select name="day">'; for ($day = 1; $day <= 31; $day++) { echo "<option value=\"$day\""; if ($day == $d) { // Preselect. echo ' selected="selected"'; } echo ">$day</option>\n"; } echo '</select>'; // Make the years pull-down menu. echo '<select name="year">'; for ($year = 2005; $year <= 2015; $year++) { echo "<option value=\"$year\""; if ($year == $y) { // Preselect. echo ' selected="selected"'; } echo ">$year</option>\n"; } echo '</select>'; } // End of the function definition. // Create the form tags. echo '<h1 id="mainhead">Select a Date:</h1> <p><br /></p><form action="dateform.php" method="post">'; // Get today's information and call the function. $dates = getdate(); make_calendar_pulldowns ($dates['mon'], $dates['mday'], $dates['year']); echo '</form><p><br /></p>'; // End of form. // Print the current day and time. echo '<p>Today is ' . date ('l') . '. The current time is ' . date ('g:i a') . '.</p>'; ?> I didn't write this script, but I can assist with modding it if you need some help. Post back here if required. |
|
|
|
Aug 29 2007, 04:54 PM
Post
#3
|
|
|
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 6,564 Joined: 21-September 04 From: 9r33|\| 399$ 4|\|D 5P4/\/\ Member No.: 1,218 ![]() |
Or if you don't want to go to the php route and want to stick with a CSS/html menu then go to http://www.cssplay.co.uk/menus/index.html since they got a nice list of multiple drop down menu's and of course other types of drop down menus;
|
|
|
|
Aug 29 2007, 05:40 PM
Post
#4
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,077 Joined: 24-July 05 From: Linix, DOS and Windows…the good, the bad and the ugly Member No.: 9,787 ![]() |
SM,
check the referenced link in the opening post. They need input selects rather than a drop-down menu. Definately a php solution (or ASP). |
|
|
|
Sep 10 2007, 09:56 AM
Post
#5
|
|
|
Newbie ![]() Group: Members Posts: 2 Joined: 28-August 07 Member No.: 48,966 |
Hey jlhaslip thank u so much for your reply. I have a basic php knowledge but dont really understand what this code does what is supposed to happen when i select from the different drop downs. I would be really greatful if you could help me with this
Thanks again He is a script which works with dates and pull-downs. If you have some php skill, you might be able to re-work it to generate the anchor tags for your site. CODE <?php # Script 3.12 - dateform.php (2nd version after Script 3.7) $page_title = 'Calendar Form'; // This function makes three pull-down menus for the months, days, and years. function make_calendar_pulldowns($m = NULL, $d = NULL, $y = NULL) { // Make the months array. $months = array (1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); // Make the months pull-down menu. echo '<select name="month">'; foreach ($months as $key => $value) { echo "<option value=\"$key\""; if ($key == $m) { // Preselect. echo ' selected="selected"'; } echo ">$value</option>\n"; } echo '</select>'; // Make the days pull-down menu. echo '<select name="day">'; for ($day = 1; $day <= 31; $day++) { echo "<option value=\"$day\""; if ($day == $d) { // Preselect. echo ' selected="selected"'; } echo ">$day</option>\n"; } echo '</select>'; // Make the years pull-down menu. echo '<select name="year">'; for ($year = 2005; $year <= 2015; $year++) { echo "<option value=\"$year\""; if ($year == $y) { // Preselect. echo ' selected="selected"'; } echo ">$year</option>\n"; } echo '</select>'; } // End of the function definition. // Create the form tags. echo '<h1 id="mainhead">Select a Date:</h1> <p><br /></p><form action="dateform.php" method="post">'; // Get today's information and call the function. $dates = getdate(); make_calendar_pulldowns ($dates['mon'], $dates['mday'], $dates['year']); echo '</form><p><br /></p>'; // End of form. // Print the current day and time. echo '<p>Today is ' . date ('l') . '. The current time is ' . date ('g:i a') . '.</p>'; ?> I didn't write this script, but I can assist with modding it if you need some help. Post back here if required. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 8th October 2008 - 08:54 AM |