I am getting the following error: Parse error: syntax error, unexpected end of file in /usr/www/whatsup4/Tool/run.php on line 31
Here is my code:
define('DB_NAME', 'whatsup4_tool');
define('DB_USER', 'whatsup4');
define('DB_PASSWORD', 'xxxxx');
define('DB_HOST', 'localhost');
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db(DB_NAME, $link);
if (!$db_selected) {
die('Can\'t use ' . DB_NAME . ': ' . mysql_error());
}
$value1 = $_POST['64id'];
$value2 = $_POST['b64id'];
$value3 = $_POST['info'];
$value4 = $_POST['ev'];
$sql = "INSERT INTO whatsup4_tool (64id, b64id, info, ev) VALUES ('$value', '$value2',
'$value3', '$value4');
mysql_query($sql);
mysql_close();
?>
Is there anything else I need to add at the end? I have never coded using SQL before. If it is relevant, here is the HTML code:
<form action="run.php" method="post"/>
<p>User's 64 ID: <input type="text" name="64id"/></br>
<p>Your 64 ID: <input type="text" name="b64id"/></br>
<p>Infringement: <input type="text" name="info"/></br>
<p>Evidence: <input type="text" name="ev"/></br>
<input type="submit" value="Submit"/>
</form>