The recipient will be unavailable until July 15th and will respond to your message afterwards.

Am 10.07.2007 um 17:15 schrieb [email protected]:

*********************************************************************
WEB STANDARDS GROUP MAIL LIST DIGEST
*********************************************************************

Due to an upgrade of SmarterMail, digests seem to have had a problem.

We are working on it.

*********************************************************************
From: "Chris Taylor" <[EMAIL PROTECTED]>
Date: Tue, 10 Jul 2007 16:11:41 +0100
Subject: RE: [WSG] Select that goes to a new URL

Your select "name" attribute is "New_URL" but you're looking for a POST attribute called "id". Change your PHP script to $_POST["New_URL"] and it
should work.

Chris



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Paul Collins
Sent: 10 July 2007 15:58
To: [email protected]
Subject: [WSG] Select that goes to a new URL

Hi all,

This should be pretty basic stuff, but coding the forms can be a bit
above me sometimes :) I've hunted around and can't seem to find the
answer, so here goes...

I've got a select box, with a bunch of options that need to go to
another page in the website when the go button is clicked. I'm running
this on my localhost, so not sure if the CGI scripts are all there, I
am running PHP though, so it would be ideal to set it up that way.

Here is my code, would appreciate any links/advice.  Cheers

        
<form action="post"
action="http://localhost/includes/redirect.php"; name="selectCourse"
id="selectCourseForm">
                                                <fieldset>
                                                        <select
name="New_URL">
        
<option>Select a course</option>
                                                                <option
value="http://localhost/courses/artsAndMedia.php";>Arts
&amp; Media</option>
                                                                <option
value="http://localhost/courses/ businessAndPublicServices.php">Business
&amp; Public Services</option>
                                                                <option
value="http://localhost/courses/careTravelAndTourism.php";>Care Travel
&amp; Tourism</option>
                                                                <option>ESOL
&amp; Languages</option>
        
<option>Hair, Beauty &amp; Sport</option>
        
<option>Humanities &amp; English</option>
                                                                <option>ICT
&amp; Maths</option>
        
<option>Performing Arts &amp; Media</option>
        
<option>Skills for life</option>
        
<option>Science</option>
                                                        </select>
                                                        <input name="submit"
type="submit" id="goButton_replace" value="Go"/>       
                                                </fieldset>
                                        </form>


I've tried it with this redirect PHP script, but doesn't seem to work:

<?php
header("Location: " . $_POST['id']);
?>


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************



**************************************************************
Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
**************************************************************




*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to