Hello, I just started using PHP not to long ago also my first time using the programming. I need some help on this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Trivia Form Successfully Submitted</title>
</head>
<body bgcolor="#F4A460">
<body>
<?php
$Genre = $POST['Genre'];
$Catsuggest = $POST['Catsuggest'];
$Gametitle = $POST['Gametitle'];
$Question = $POST['Question'];
$Answer = $POST['Answer'];
$Link = $POST['Link'];
$Comment = $_POST['Comment'];
$message = "The category of the user submitted is $Genre = $POST['Genre']\n";
$message .= "If user suggested a category, user suggested $Catsuggest = $POST['Catsuggest']\n";
$message .= "If user gave a name for a game, game's name is $Gametitle = $POST['Gametitle']\n";
$message .= "The Question submitted by user is $Question = $POST['Question']\n";
$message .= "The Answer submitted by user is $Answer = $POST['Answer']\n";
$message .= "The Link submitted by user is $Link = $POST['Link']\n";
$message .= "If user left a comment, he/she said $Comment = $_POST['Comment']";
$msg = "Sender Name:\t$sender_name\n";
$msg .= "Sender E-Mail:\t$sender_email\n";
$msg .= "Message:\t$message\n\n";
$recipient = "secretply@yahoo.com";
$subject = "Trivia Form";
$mailheaders = "From: www.triviabot.fizzlebot.com <secretply@gmail.com>";
echo "The category you chose is $Genre.<br>\n";
echo "If you suggested a category, you suggested $Catsuggest.<BR>\n";
echo "If you gave a name for a game, it is $Gametitle.<BR>\n";
echo "The Question submitted by you is $Question.<BR>\n";
echo "The Answer submitted by you is $Answer.<BR>\n";
echo "The Link submitted by you is $Link.<BR>\n";
echo "If you left a comment, you said $Comment.<BR>\n";
echo"<H1 align=center>Thank You
<P align=center>Your Form has been submitted.";
?>
</body>
</html>
It would help me if you can tell me which line(s) is the problem and show me the solution and correct way of fixing the line(s). With your help hopefully I can learn from the mistakes and continue using PHP and HTML forms, here is also the HTML code as well in case you need it.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Trivia Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#B8C061">
<body>
What type of category would you like to suggest a question to secret_player?
<form name="Category" action="html_form_action.asp"
method="post">
<select name="Genre">
<optgroup label="Genre">
<option value="action">Action</option>
<option value="adventure">Adventure</option>
<option value="arcade">Arcade</option>
<option value="cardgames">Card Games</option>
<option value="fighting">Fighting</option>
<option value="kidsgames">Kids Games</option>
<option value="puzzle">Puzzle</option>
<option value="racing">Racing</option>
<option value="role-playing">Role Playing</option>
<option value="shooting">Shooting</option>
<option value="simulation">Simulation</option>
<option value="sports">Sports</option>
<option value="strategy">Strategy</option>
<option value="wordgames">Word Games</option>
</optgroup>
<optgroup label="Platform">
<option value="c64">Commodore 64</option>
<option value="gba/c">Game Boy Advance/Color</option>
<option value="n64">Nintendo 64</option>
<option value="nds">Nintendo DS</option>
<option value="nes">Nintendo Entertainment System</option>
<option value="ngc">Nintendo Gamecube</option>
<option value="wii">Nintendo Wii</option>
<option value="ps">Playstation</option>
<option value="ps2">Playstation 2</option>
<option value="ps3">Playstation 3</option>
<option value="snes">Super Nintendo Entertainment System</option>
<option value="xbox">Xbox</option>
<option value="xbox360">Xbox 360</option>
<optgroup>
<optgroup label="Online Games">
<option value="onlinegames">Online Games</option>
</optgroup>
<optgroup>
<optgroup label="Video Games">
<option value="videogames">Video Games</option>
</optgroup>
</select>
<br>
<br>
If you would like to suggest a game in a platform, please choose Online Games or Video Games, if it's a question about a platform or a platform in general, please choose the appropriate platform category.
<br>
<br>
Genre should only be selected if it's a question in general. If it's about a game, please choose Online Games or Video Games suited to the appropriate category.
<br>
<br>
NOT REQUIRED: Suggest a type of category and/or sub-category to be added in the future of the category section
<br>
<textarea name="Catsuggest" rows="1" cols="25"></textarea>
<br>
<br>
REQUIRED with restrictions: Please enter the name of the game here (Do not enter anything if you chose any sub-categories of genre or platforms)
<br>
<textarea name="Gametitle" rows="1" cols="50"></textarea>
<br>
<br>
REQUIRED: Please enter your question here
<br>
<textarea name="Question" rows="1" cols="75"></textarea>
<br>
Please don't put a question that is true/false or yes/no.
<br>
<br>
REQUIRED: Please enter your answer here
<br>
<textarea name="Answer" rows="1" cols="75"></textarea>
<br>
<br>
REQUIRED: Please provide an external link to the source of the question and answer.
This is only so the person reading the form knows it is a fact and not made up.
<br>
<textarea name="Link" rows="1" cols="75"></textarea>
<br>
<br>
NOT REQUIRED: Here use this box for your comments, feedback, or opinion about this form. Your opinion will be totally accepted and appreciated.
<br>
<textarea name="Comment" rows="5" cols="100"></textarea>
</form>
<form name="input" action="Emailform.php"
method="post">
<input type="submit" value="Send Form">
</form>
<br>
Updated as of August 21, 2007 at 22:27 Eastern USA Time
<table border="1">
<tr>
<th>Forms Submitted</th>
<th>Forms Accepted</th>
<th>Forms Rejected</th>
<th>Forms Pending</th>
</tr>
<tr>
<td style="color: blue">0</td>
<td style="color: green">0</td>
<td style="color: red">0</td>
<td style="color: brown">0</td>
</tr>
</table>
</body>
</html>