• Howdy,
    I’m still getting used to PHP syntax, and I’m sure this is what the error may be. I’m trying to put a contact form in the sidebar, displaying on my contact us page.

    Here’s the error I’m gettting:

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /home/zigflitz/public_html/sms/wp-content/themes/classic/sidebar.php on line 10

    Here’s my sidebar php:
    https://www.pastecode.com/8572

    If you’d like to see the actual error message in the context of the site, the url is https://www.zigflitz.com/sms

Viewing 2 replies - 1 through 2 (of 2 total)
  • Change this:

    echo "<p><form method="post" action="contact-handler.php"><p>Fields marked (*) are required</p>";

    to this:

    echo '<p><form method="post" action="contact-handler.php"><p>Fields marked (*) are required</p>';

    Oops, a little careless of me. Actually, change:

    echo "<p><form method="post" action="contact-handler.php"><p>Fields marked (*) are required</p>";
    "<h5>E-mail address*</h5>";
    "<p><input name="EmailFrom" class="text" /></p>";
    "<h5>Name</h5>";
    "<p><input name="Name" class="text" /></p>";
    "<h5>Telephone number</h5>";
    "<p><input name="Telephone" class="text" /></p>";
    "<h5>Message</h5>";
    "<p><textarea rows="5" id="textarea" name="Message"></textarea></p>";
    "<p><input name="submit" type="submit" value="Submit"></input></p>";
    "</form></p>";

    to this:

    echo <p><form method="post" action="contact-handler.php"><p>Fields marked (*) are required</p>
    <h5>E-mail address*</h5>
    <p><input name="EmailFrom" class="text" /></p>
    <h5>Name</h5>
    <p><input name="Name" class="text" /></p>
    <h5>Telephone number</h5>
    <p><input name="Telephone" class="text" /></p>
    <h5>Message</h5>
    <p><textarea rows="5" id="textarea" name="Message"></textarea></p>
    <p><input name="submit" type="submit" value="Submit"></input></p>
    </form></p>';

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in …’ is closed to new replies.