Hi I have checked and cannot figure out what is causing it:
Parse error: parse error, unexpected $ in [location of doc]/add_note.php on line 105
I have checked above line 105 to see if there is an extra $, the only thing I found was an escaped $. I tried removing this still same error. Could someone take a look at my 104 lines of code and see if maybe four sets of eyes are better then my two😃 .
<?php
require_once("$DOCUMENT_ROOT/functions/functions.php");
style_sheet();
$ip = getenv ("REMOTE_ADDR");
$client_id = $HTTP_GET_VARS['ss'];
$location_id = $HTTP_COOKIE_VARS['alcheck_id'];
$master_user_id = $HTTP_COOKIE_VARS['alcheck_master'];
$ss = format_ss($client_id);
if(!isset($submit))
{
?>
HTML containing form with a action =$PHP_SELF
<?php
} else {
$amount = $HTTP_POST_VARS['amount'];
$note = $HTTP_POST_VARS['note'];
if(!$note == "")
{
$despostion = "Added amount: $amount to this social: $ss\n
Added Note: $note";
}
elseif(!$amount =="")
{
$despostion = "Added amount: $amount to this social: $ss";
} else {
$despostion = "Both the note and amount fields are empty";
echo "<br><br><center>You did not fill out the form properly please try again.
Hit the back button after examining the errors below.<br>";
echo $desposition."</center>";
exit;
}
$insert_client_info = "insert into clients (amount, total)
VALUES ($amount, $total) where client_id = $client_id";
mysql_query($insert_client_info) or
die("<br><br><b>Error:</b><br>".mysql_error());
$insert_history = "insert into access_history
(client_id, store_id, master_user_id, despostion, ip_address)
VALUES ($client_id, $location_id, $master_user_id, $despostion, $ip)";
mysql_query($insert_history) or
die("<br><br><b>Error:</b><br>".mysql_error());
echo "<br><br><center>\n";
echo "Thank you, [store_name] for submitting the following data:";
echo "Amount: \$$amount<br>\n";
echo "Note:\n <br>$note\n";
echo "<br><a href='search.php'>Go back to search page.</a></center>";
?>
Thanks for any help in advance.