Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2003, 12:34 PM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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---->
<HTML>
<HEAD></HEAD>
<BODY>
<FORM METHOD=POST ACTION="checkboxes.php">
Have you ever eaten haggis before?
<INPUT NAME="Choice1" TYPE="Checkbox" VALUE="Haggis">
<BR>
Have you ever eaten snails before?
<INPUT NAME="Choice2" TYPE="Checkbox" VALUE="Snails">
<BR>
Have you ever eaten locusts before?
<INPUT NAME="Choice3" TYPE="Checkbox" VALUE="Locusts">
<BR>
<BR>
<INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>
<---End checkboxes.html---->


<---Begin checkboxes.php---->
<HTML>
<HEAD></HEAD>
<BODY>
<?php
echo "$Choice1<BR>";
echo "$Choice2<BR>";
echo "$Choice3<BR>";
?>
</BODY>
</HTML>
<---End checkboxes.php---->
 
Old June 22nd, 2003, 12:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

http://p2p.wrox.com/topic.asp?TOPIC_ID=628
 
Old June 22nd, 2003, 01:06 PM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the pointer. I overlooked the obvious.





Similar Threads
Thread Thread Starter Forum Replies Last Post
printing a php file in .pdf format farukcse Pro PHP 0 November 18th, 2007 03:13 PM
printing in php...urgent raaj Beginning PHP 1 March 14th, 2007 12:57 AM
Printing Documents from a Form seananderson Access VBA 0 February 8th, 2007 05:04 AM
Printing Form kedar_bhandare C# 2005 0 December 27th, 2006 04:27 AM
Printing a form with a subform in it jcalfg Access 1 July 25th, 2006 03:40 PM





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