Parse error: syntax error, unexpected T_STRING in E:\Program Files\wamp\www\practice\

Reply

Join Date: Apr 2008
Posts: 35
Reputation: cali_dotcom is an unknown quantity at this point 
Solved Threads: 0
cali_dotcom cali_dotcom is offline Offline
Light Poster

Parse error: syntax error, unexpected T_STRING in E:\Program Files\wamp\www\practice\

 
0
  #1
Apr 18th, 2008
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..

  1. if($_POST[fax_number] ) {
  2. [COLOR="Red"]$add_fax_sql = "INSERT INTO fax ("master_id", "date_added", "date_modified", "fax_number", "type")[/COLOR] VALUES ('".$master_id."', now(), now(), '".$_POST["fax_number"]."','".$_POST["fax_type"]."')";
  3. $add_fax_res = mysql_query($mysql, $add_fax_sql)
  4. or die(mysql_error());
  5. }
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 570
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Parse error: syntax error, unexpected T_STRING in E:\Program Files\wamp\www\practice\

 
0
  #2
Apr 18th, 2008
i have edited the code.here it is:

  1. if($_POST[fax_number] ) {
  2.  
  3. $add_fax_sql = "INSERT INTO fax VALUES('".$master_id."', now(), now(), '".$_POST["fax_number"]."','".$_POST["fax_type"]."')";
  4. $add_fax_res = mysql_query($mysql, $add_fax_sql)
  5. or die(mysql_error());
  6. }
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 570
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Parse error: syntax error, unexpected T_STRING in E:\Program Files\wamp\www\practice\

 
0
  #3
Apr 18th, 2008
By the way please don't post 2 same threads.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 952 | Replies: 2
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC