p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Beginning PHP (http://p2p.wrox.com/forumdisplay.php?f=95)
-   -   php not printing variable from a form (http://p2p.wrox.com/showthread.php?t=831)

ebmsynthpop June 22nd, 2003 12:34 PM

php not printing variable from a form
I am trying to get the checkboxes.htm & checkboxes.php from chapter 3 of the Beginning PHP book to work. When the checkboxes.htm calls the php script, it does not print the value from the form. I can echo strings within the php and they display correctly, but the value of the form is not displayed. Here is the code:

<---Begin checkboxes.html---->
<FORM METHOD=POST ACTION="checkboxes.php">
Have you ever eaten haggis before?
<INPUT NAME="Choice1" TYPE="Checkbox" VALUE="Haggis">
Have you ever eaten snails before?
<INPUT NAME="Choice2" TYPE="Checkbox" VALUE="Snails">
Have you ever eaten locusts before?
<INPUT NAME="Choice3" TYPE="Checkbox" VALUE="Locusts">
<---End checkboxes.html---->

<---Begin checkboxes.php---->
echo "$Choice1<BR>";
echo "$Choice2<BR>";
echo "$Choice3<BR>";
<---End checkboxes.php---->

NotNowJohn June 22nd, 2003 12:57 PM


ebmsynthpop June 22nd, 2003 01:06 PM

Thanks for the pointer. I overlooked the obvious.

All times are GMT -4. The time now is 10:24 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.