Wrox Programmer Forums
| 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 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 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?

 
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
:::::::::::::::::::::::::::::::::
 
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.






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





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