hadoob024 Posted November 2, 2006 Share Posted November 2, 2006 I have now been looking at this for about 2 hours and cannot for the life of me see where this error is coming from. I thought it usually means that I have a '(' or '[' out of place, but still can't seem to find it. Anyway, the error message is:"Parse error: parse error, unexpected T_STRING in /blah.php on line 204"And here's the code:[CODE]if (isset($_POST['expyear'])){ if ((strlen($_POST['expyear']) == 4) && (is_numeric($_POST['expyear']))) $expyear = $_POST['expyear']; else { $problem = 7; $problemtext .= '<B>You did not enter a valid credit card expiration year.</B><P>'; }}else{ $problem = 7; $problemtext .= '<B>You did not enter a valid credit card expiration year.</B><P>';}if (isset($_POST['cvm'])){ if (strlen($_POST['cvm']) == 0) $cvm = ''; elseif (((strlen($_POST['cvm']) == 3) || (strlen($_POST['cvm']) == 4)) && (is_numeric($_POST['cvm']))) $cvm = $_POST['cvm']; else { $problem = 7; $problemtext .= '<B>You did not enter a valid CVM number.</B><P>'; }}else{ $cvm = '';}if (isset($_POST['cvmnotpres'])){ if ($_POST['cvmnotpres'] == 'on') $cvmnotpres = $_POST['cvmnotpres']; else { $problem = 7; $problemtext .= '<B>You did not enter a valid value for the "Code not present" checkbox.</B><P>'; }}if (isset($_POST['bname'])){ if (strlen($_POST['bname']) <= 60) $bname = $_POST['bname']; else { $problem = 7; $problemtext .= '<B>Billing name is too long or wasn't entered.</B><P>'; }}else{ $problem = 7; $problemtext .= '<B>Billing name is too long or wasn't entered.</B><P>';}[/CODE]Anyway, the error line comes to this line "$problem = 7;" in the "if (isset($_POST['bname']))" section. I included the lines before it to because I know the line numbers usually don't line up properly with this kind of error. Anyone see anything? I've already gone cross-eyed and need to take a break. Thanks! Link to comment https://forums.phpfreaks.com/topic/25951-parse-error-parse-error-unexpected-t_string-error-message/ Share on other sites More sharing options...
alpine Posted November 2, 2006 Share Posted November 2, 2006 on two places,faulty: $problemtext .= '<B>Billing name is too long or wasn[color=red]'[/color]t entered.</B><P>';ok: $problemtext .= '<B>Billing name is too long or wasn[color=green]\[/color]'t entered.</B><P>'; Link to comment https://forums.phpfreaks.com/topic/25951-parse-error-parse-error-unexpected-t_string-error-message/#findComment-118534 Share on other sites More sharing options...
hadoob024 Posted November 2, 2006 Author Share Posted November 2, 2006 SWEET!!! Thanks a bunch! I finished up everything late last night and gave up on it at like 4 a.m. Then I just started again and couldn't find it. Thanks, you saved me from a miserable afternoon! Link to comment https://forums.phpfreaks.com/topic/25951-parse-error-parse-error-unexpected-t_string-error-message/#findComment-118544 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.