Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 17th, 2003, 01:24 PM
Authorized User
 
Join Date: Oct 2003
Location: , Ok, .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default CH5 p 184

I am receiving:

Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\Documents and Settings\Administrator\My Documents\My Work\PHP\Beg_PHP4\CH5\exam.php on line 20

from this code:

<html><head></head>
<body>
    <?php
        echo "<form method = 'POST' action = 'exam2.php'>";
            $Student = array ("Einstein", "Ivan", "Napeleon", "Smart", "Newton" );
        while (list(, $Name) = each($Student))
        {
            echo "What grade did $Name get in Math?";
            echo "<br />";
            echo "<select name = 'Math[]'>
                <option> Grade A </option>
                <option> Grade B </option>
                <option> Grade C </option>
                <option> Grade E</option>
            </select>";
            echo "<br />";
            echo "<input type = HIDDEN name = Student[] value = '$Name'>:;
        }

        echo " <input type = Submit > </form>";
    ?>
</body></html>

I have tried

echo "<input type = 'Submit'> </form>";
echo "<input type = Submit> </form>";


What is wrong?

Reply With Quote
  #2 (permalink)  
Old November 17th, 2003, 04:13 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Quote:
quote:
I have tried

echo "<input type = 'Submit'> </form>";
echo "<input type = Submit> </form>";
That's cause you're missing a quote from this line:

echo "<input type = HIDDEN name = Student[] value = '$Name'>:;



:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::
Reply With Quote
  #3 (permalink)  
Old November 17th, 2003, 04:41 PM
Authorized User
 
Join Date: Oct 2003
Location: , Ok, .
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Its greate to have forums like this. Its the little things that we seem to miss.

Thanks for the help.


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch5 Ex5_03 yetri56 BOOK: Ivor Horton's Beginning Visual C++ 2005 1 April 14th, 2008 02:36 AM
CH5 ObjectDataSource nabeelalkaff BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 March 8th, 2007 01:19 PM
ch5 Fooreader zxmlDom is undefined razzzzer BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 February 8th, 2007 05:01 AM
CH5 pg 150 While Loops wadesmart BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 11 November 8th, 2003 04:51 PM



All times are GMT -4. The time now is 07:58 PM.


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