Jump to content

"Parse error: parse error, unexpected T_STRING" error message


hadoob024

Recommended Posts

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.