I'm getting the "Parse error: parse error, unexpected $" message, so there must be something off, although, I can't find it.
Can anyone see what's wrong?
<?php
require_once ('../../include/config.inc');
$page_title = 'Page Title';
include ('../../include/header.html');
if (isset($_POST['submit'])) {
if ($_POST['submit']=="Save") {
require_once ('mysql_connect.php');
if(!empty($_POST['hh_notes'])) {
$hn = escape_data($_POST['hh_notes']);
} else {
$hn = ' ';
}
if (($_POST['hh_1_a']) > 0) {
$h1 = '1';
} else {
$h1 = '0';
}
if ($hh && $h1) {
$query = "INSERT INTO table (user_id, entry_date, filename, hh_notes, hh_1_a)
VALUES ('1111', NOW(), NOW(), '$hn', '$h1')";
$result = @mysql_query ($query);
if ($result) { //If it ran ok
echo 'good';
exit();
} else { //If it did not run ok
echo '<p><font color="red" size="1">system error.</font></p>';
}
mysql_close();
} else { //If one of the data tests failed
echo '<p><font color="red" size="1">Please try again</font></p>';
}
?>