Hi Mario,
you can set error_reporting to E_ALL to give you more hints to
bugs and to produce clean code.
You are having two problems. The first was related to your form
and has been addressed by Yasin.
The second is that you have autoglobals off. That means you have
to use $_SERVER['PHP_SELF']. BTW: You could have found this
error by reading about predefined variables, PHP_SELF in the
manual.
Timo
Working:
<?php
echo ' <form name="test" action="'.$_SERVER['PHP_SELF'].'"
method="POST"><br>
<select name="color" id="colorPicker"
onChange="changeColor(this.options[this.selectedIndex].value)">
<option>Background Color
<option value="0000FF">Blue
<option value="FF0000">Red
<option value="00FF00">Green
<option value="000000">Black
</select>
<input type="submit" value="Click To View Submission">
</form>
';
if(isset($_POST['color'])) {echo $_POST['color'];}
?>
</body>
</html>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php