I am having some trouble. Can someone tell me why this isn't inserting the information into the database?
PHP Code:
<?php
// Connects to the Database
include("dbconnect");
//This code runs if the form has been submitted
if (isset($_POST['submit'])) {
// Adding information into the data base.
$username = $_POST['entry_username'];
$theman = $_POST['TeamCap'];
$team = $_POST['team_request'];
$howmany = $_POST['SeasonCount'];
$box = $_POST['terms'];
mysql_query("INSERT INTO signups (entry_username, TeamCap, team_request, SeasonCount, terms)
VALUES ('$username', '$theman', '$team', '$howmany', '$box')")or die(mysql_error());
?>
<center>
Thank you <strong>
<?php
echo $_POST['entry_username']
?></strong> was added to Team <strong><?php
echo $_POST['team_request']
?></strong></center>
<?php
}
else {
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
**** then the form****
****</html>****
<?
}
?>
Bookmarks