开发者

I'm getting a semicolon error in PHP and can't understand why it's a problem [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this开发者_如何转开发 question more broadly applicable, visit the help center. Closed 9 years ago.

This is the error message:

Parse error: syntax error, unexpected ';' in /home1/goldensu/public_html/camira/contactForm.php on line 155

and this is the code:

      $sendMessage = "Someone is interested in becoming a reseller or installer.<br /><br /><br />
        <b><u>Country</u>:</b> "
        .stripslashes($country)."<br /><br />\n
        <b><u>Company Name</u>:</b> "
        .stripslashes($companyName)."<br /><br />\n
        <b><u>Office Address</u>:</b> "
        .stripslashes($officeAddress)."<br /><br />\n
        <b><u>Company Phone</u>:</b> "
        .stripslashes($companyPhone)."<br /><br />\n
        <b><u>Company Email</u>:</b> "
        .stripslashes($companyEmail)."<br /><br />\n
        <b><u>Web page</u>:</b> "
        .stripslashes($webPage."<br /><br />\n
        <b><u>Number of emplyees</u>:</b> "
        .stripslashes($numberEmployees)."<br /><br />\n
        <b><u>Yearly turnover</u>:</b> "
        .stripslashes($turnover)."<br /><br />\n
        <b><u>Marketing Activities</u>:</b> "
        .stripslashes($marketingActivities)."<br /><br />\n
        <b><u>Annual marketing budget</u>:</b> "
        .stripslashes($marketingBudget)."<br /><br />\n
        <b><u>Current renewable energy products</u>:</b> "
        .stripslashes($energyProducts)."<br /><br />\n
        <b><u>Length of agreements</u>:</b> "
        .stripslashes($agreements)."<br /><br />\n
        <b><u>Territories</u>:</b> "
        .stripslashes($territories)."<br /><br />\n
        <b><u>Staff Qualifications</u>:</b> "
        .stripslashes($staffQualifications)."<br /><br />\n";

It's complaining about the semicolon at the end. Is it something stupid?


Problem is here:

.stripslashes($webPage."<br /><br />\n

it appears you have missed a closing bracket ) :

.stripslashes($webPage)."<br /><br />\n


In this context it's most likely a missing paranthesis in the previous expressions.

It seems this one:

    .stripslashes($webPage."<br /><br />\n
    <b><u>Number of emplyees</u>:</b> "

(A error that could have been avoided by applying a magic_quotes workaround centrally.)


Just seen the missing closing bracket... Silly me!

.stripslashes($webPage."<br /><br />\n
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜