Error on Unknown Problems with PHP
| From: | webdev120 at netscape dot net | Date: | Thu, 22 Jan 2004 13:42:31 +0000 |
| Subject: | Error on Unknown Problems with PHP | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-23111@lists.php.net to get a copy of this message | ||
Dear Sir/Madam,
I am a student and new to PHP, I have wrote a PHP file however it does work properly. Here is the
code:
<?php
$form &= $HTTP_POST_VARS;
switch($form['$step'])
{
case 1:
default:
?>
<html>
<head>
<title>Step 1: Sample Application Form</title>
</head>
<body>
<form action="<?php $PHP_SELF; ?>" method="post">
<input type="hidden" name="step" value="2">
Name: <input type="text" name="strName"><br>
Class: <input type="text" name="strClass"><br>
Student Number: <input type="text" name="intStuNum"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
<?php
break;
case 2:
?>
<html>
<head>
<title>Step 2: Sample Application Form</title>
</head>
<body>
Name : <?php echo $form['strName']; ?><br>
Class : <?php echo $form['strClass']; ?><br>
Student Number : <?php echo $form['intStuNum']; ?>
</body>
</html>
<?php
break;
case 3:
echo "Errors!!!";
break;
}
?>
Would you please let me know what's wrong with it? Thank you!!!
Yours Faithfully,
Charoite Lee
__________________________________________________________________
New! Unlimited Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register
Act now to get a personalized email address!
Netscape. Just the Net You Need.