0

Parse error: syntax error, unexpected T_STRING in E:\Program Files\wamp\www\practice\addentry.php on line 89

hi, i keep getting this error and i just cant figure out what is wrong. i got this code off a book that uses php v 5.1.4 and my wamp server runs php v 5.2.5, could this be a problem? does anybody know where i could download a good free php texteditor/compiler?
here is the code, line 89 is marked in red..

if($_POST[fax_number] ) {
	$add_fax_sql = "INSERT INTO fax ("master_id", "date_added", "date_modified", "fax_number", "type") VALUES ('".$master_id."', now(), now(), '".$_POST["fax_number"]."','".$_POST["fax_type"]."')";
	$add_fax_res = mysql_query($mysql, $add_fax_sql)
		or die(mysql_error());
}
2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by ryan_vietnow
0

i have edited the code.here it is:

if($_POST[fax_number] ) {
   
   $add_fax_sql = "INSERT INTO fax VALUES('".$master_id."', now(), now(), '".$_POST["fax_number"]."','".$_POST["fax_type"]."')";
  $add_fax_res = mysql_query($mysql, $add_fax_sql)
   or die(mysql_error());
  }
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.