Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Multiple Drop Down Lists ?, Multiple drop down lists to take user to new page
claireb85
post 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&region=B

I have searched the web and come close but nothing does it right

I would be extremely greatful if anyone could help!

Thanks
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

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
Spam Patrol



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.
Go to the top of the page
 
+Quote Post
Saint_Michael
post 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
T17 GFX Crew



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;
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

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
Spam Patrol



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).
Go to the top of the page
 
+Quote Post
claireb85
post 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

QUOTE(jlhaslip @ Aug 29 2007, 05:33 PM) *
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.

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Php Login Script(18)
  2. Php Sessions(2)
  3. Php Classes(1)
  4. User Login System With Setcookies(13)
  5. Drop Down Lists Using Dates(5)
  6. How Handle Sending Back Multiple Checkboxes(1)
  7. Cleaning User Input With Regex(1)
  8. Multiple Options?(3)
  9. Password Strength / User Availablity Scripts ?(2)
  10. Script That Tracks The User Status(4)
  11. Evilboard (forum Software) - Multiple Categorys - Don't Work :((6)
  12. Directing To A User To Specific Page First Time Only(3)
  13. Using Multiple Selection Array In Table To Order Data(1)
  14. Compare 2 List Of User Ids From Different Tables(1)
  15. [mysql]get Id Of Loged In User?(7)
  1. Php Ftp Upload Form(1)
  2. Unexpected T_string In User.php [resolved](5)


 



- Lo-Fi Version Time is now: 8th October 2008 - 08:54 AM