Houdini - Hopefully I have done this properly....
the first two files are feedback.html and handle_form.php as copied from the web site.
feeback.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="text/html; charset=
iso-8859-1" />
<title>Feedback Form</title>
</head>
<body>
Please complete this form to submit your
feedback: <br />
<form action="handle_form.php"
method="post">
Mr. <input type="radio" name="title"
value="Mr." />
Mrs. <input type="radio" name="title"
value="Mrs." />
Ms. <input type="radio" name="title"
value="Ms." />
<br />
Name: <input type="text" name="name" size="20" />
<br />
Email Address: <input type="text"
name="email" size="20" />
<br />
Response: <select name="response">
<option value="excellent">This is
excellent.</option>
<option value="okay">This is
okay.</option>
<option value="boring">This is
boring.</option>
</select>
<br />
Comments: <textarea name="comments"
rows="3" cols="30"></textarea>
<br />
<input type="submit" name="submit"
value="Send My Feedback" />
</form>
<!-- Script 3.3 - feedback.html -->
</body>
</html>This book uses POST almost exclusively for handling forms
form_handler.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="text/html; charset=
iso-8859-1" />
<title>Your Feedback</title>
</head>
<body>
<?php // Script 3.4 - handle_form.php
// This page receives the data from
feedback.html.
// It will receive: title, name, email,
response, comments, and submit.
print "Thank you $title $name for your
comments. <br />";
print "You stated that you found this
example to be $response and added:
$comments";
?>
</body>
</html>
the following files are mine
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="text/html; charset=
iso-8859-1" />
<title>aaaaaa</title>
<script language="JavaScript">
<!--
function radio_button_checker()
{
// set var radio_choice to false
var radio_choice = false;
// Loop from zero to the one minus the number of radio button selections
for (counter = 0; counter < radio_form.radio_button.length; counter++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (radio_form.radio_button[counter].checked)
radio_choice = true;
}
if (!radio_choice)
{
// If there were no selections made display an alert box
alert("Please select an option.")
return (false);
}
return (true);
}
-->
</script>
</head>
<BODY >
<!-- START QUESTION AREA -->
The Instant Information page of our site will provide you with information of all
club facilities updated on a daily basis by staff from each of those organizations.
You may designate this as your start page when you enter glenmoremember.com. Select
your option below.
<!-- END QUESTION AREA -->
<!-- START ANSWER AREA -->
<form action="seldone.php?select=111111"
onsubmit="return radio_button_checker()" name="radio_form">
<INPUT TYPE="radio" NAME="radio_button" value="1"> <B>Yes, make Instant Information
my start page.</B><BR>
<INPUT TYPE="radio" NAME="radio_button" value="2"> <B>No, I wish to enter the
regular home page.</B><BR>
<INPUT TYPE="SUBMIT" name="Submit" VALUE="Save">
</FORM>
<!-- END ANSWER AREA -->
</body>
</html>
In this file, I just wanted to see if the parameters came through. However, ion both cases I get the windows file download alert.
<?php
$myvar2 = $_POST['select'];
echo "MyVar2: ".$myvar2;
echo "in seldone";
if(! empty($_POST))
{
$pref = $_POST['pref'];
$select = $_POST['select'];
echo "pref = $pref<br/>";
echo "select = $select<br/>";
}
?>