I have a simple form which I want to try out (before rewriting to do
something useful)... and am having problems getting the variable to output.
From what I read I have coded it to get around the "register_globa ls"
being off (both on my localhost and my ISP)... but I cannot get the
variable output, below is my HTML and PHP.
Basically, the HTML file contains a form with a select box which is
supposed to pass the variable to the PHP script so it can print the result
of the variable selected.
After much searching online and head scratching, I can't find what I've
done wrong. Can anyone help?
Dariusz
++HTML++
<HTML><HEAD><TI TLE>Redirector test</TITLE></HEAD>
<BODY>
<FORM method="POST" action="redirec tor.php">
<select name="$_POST['album']">
<option value="a01-t01" SELECTED>Album 01, Track 01</option>
<option value="a01-t02">Album 01, Track 02</option>
</select>
<input type="submit" value="Submit">
</FORM>
</BODY>
</HTML>
++PHP++
<?
echo ('The results is: $album');
?>
something useful)... and am having problems getting the variable to output.
From what I read I have coded it to get around the "register_globa ls"
being off (both on my localhost and my ISP)... but I cannot get the
variable output, below is my HTML and PHP.
Basically, the HTML file contains a form with a select box which is
supposed to pass the variable to the PHP script so it can print the result
of the variable selected.
After much searching online and head scratching, I can't find what I've
done wrong. Can anyone help?
Dariusz
++HTML++
<HTML><HEAD><TI TLE>Redirector test</TITLE></HEAD>
<BODY>
<FORM method="POST" action="redirec tor.php">
<select name="$_POST['album']">
<option value="a01-t01" SELECTED>Album 01, Track 01</option>
<option value="a01-t02">Album 01, Track 02</option>
</select>
<input type="submit" value="Submit">
</FORM>
</BODY>
</HTML>
++PHP++
<?
echo ('The results is: $album');
?>
Comment