hi, I’m currently learning php. There is this exercise in my training book that i just can’t get to work. I’ve copied it letter for letter just to make sure. What’s ment to happen is once i submit the form it reloads the page and displays my choice. That’s not happening. Is anyone able to help?
[URL]http://www.magicfrontier.com/temp/phptesting/listing7_3.php
<html>
<head>
<title>Listing 7.3</title>
</head>
<body>
[code=php]<?php
// if not executed for first time;
if (isset($_REQUEST[‘part’]))
{
print(“<h3>Last Burger</h3>n”);
print(“<u1>n”);
foreach($_REQUEST[‘part’] as $part)
{
print(“<li>$part</li>n”);
}
print(“</u1>n”);
}
$option=array(“mustard”, “ketchup”, “pickles”, “onions”, “lettuce”, “tomato”);
print(“<h3>Create a Burger</h3>n”);
print(“<form action=”{$HTTP_SERVER_VARS[‘PHP_SELF’]}”>n”);
foreach($option as $o)
{
print(“<input type=”checkbox” name=”part[]” value=”$o”> $o<br>n”);
}
print(“<input type=”submit”>n”);
print(“</form>n”);
?>
</body>
</html>
Thanks Coen