I got the below code to work fine using my computer. But it doesn't work on my site. I used frontpage and inserted the code below from the <body> to <body> code.
The form shows up but when I click submit, I get Page not found error.
I read somewhere about using the % with frontpage but when I replace the <?php with %, it doesn't work on my computer.
I know it is Christmas, but I am so close. All I need to add to this code is a section to add the information to a DB. I already have the table set up on my site and the code is ready.
Any help would be appreciated.
arelgee www.are-l-gee.com
<html>
<body>
<?php
if ($submit) {
// process form
echo "Thank you ";
echo $YourName;
echo " Here are your picks:\n";
echo " <br> Number 1 pick = ";
echo $Num1Pick;
echo " <br> \n Number 2 pick = ";
echo $Num2Pick;
echo "\n<br> Number 3 pick = ";
echo $Num3Pick;
echo "\n<br> Number 4 pick = ";
echo $Num4Pick;
echo "\n <br> Number 5 pick = " ;
echo $Num5Pick;
} else{
?>
<form method="post" action="<?php echo $PHP_SELF?>">
Hello and Welcome to arelgee's basher/hypster stock picking contest.<br>
The next contest starts at the NY close on December 27, 2002.<br>
Enter your name and the five stocks below. If you want to short<br>
a stock, Prefix it with the word short. All entries will be considered long<br>
otherwise.<br>
My name is:
<input type="text" name="YourName">
<p>
My number 1 pick is:
<input type="text" name="Num1Pick">
<p>
My number 2 pick is:
<input type="text" name="Num2Pick">
<p>
My number 3 pick is:
<input type="text" name="Num3Pick">
<p>
My number 4 pick is:
<input type="text" name="Num4Pick">
<p>
My number 5 pick is:
<input type="text" name="Num5Pick">
<p>
<input type="Submit" name="submit" value="Enter my picks">
</form>
<?php
} // end if
?>
</body>
</html>