It still will not work. I changed the original value of $query to what you told me to. I substituted the column names for the fieldnames, is that correct?ffa is the name of my table. Also when I try and run this script it brings up this error
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/chilllax/public_html/tournament/yourentry.php on line 40
If you need me to I can also post the code of the forms.
PHP Code:
<html>
<head>
<title>Your Entry</title>
</head>
<table align="center">
<tr>
<td>
<a href="http://www.officalhalo.com">Home</a> |
<a href="/tournament/FFA.htm">FFA</a> |
<a href="/tournament/signup.htm">Sign Up</a> |
<a href="/tournament/results.htm">Results</a>
</td>
</tr>
</table>
<body>
<h3 align="center">Your Entry</h3>
<?php
$gamertag=$_POST['gamertag'];
$eaddress=$_POST['eaddress'];
if (!$gamertag || !$eaddress)
{
echo 'You have not entered all of the required information.<br />'
.'Please go back and try again.';
exit;
}
@ $db = new mysqli('localhost', 'chilllax_chillla', 'red123', 'chilllax_tournament');
if (mysqli_connect_errno())
{
echo 'Error: Could not connect to database. Please try again later.';
exit;
}
$query = "INSERT INTO " . TABLE_PREFIX ." ffa (gamertag, eaddress)
VALUES ("' $gamertag . '", "' . $eaddress . '")";
$result = $db->query($query);
if ($result)
echo $db->affected_rows.' Entry submitted into database.';
$db->close();
?>
</body>
</html>