Title: Parse error: syntax error, unexpected T_STRING, expecting &#8216;,&#8217; or &#8216;;&#8217; in &#8230;
Last modified: August 18, 2016

---

# Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in …

 *  [polaricecap](https://wordpress.org/support/users/polaricecap/)
 * (@polaricecap)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-or-in/)
 * 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:
    [http://www.pastecode.com/8572](http://www.pastecode.com/8572)
 * If you’d like to see the actual error message in the context of the site, the
   url is [http://www.zigflitz.com/sms](http://www.zigflitz.com/sms)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Pizdin Dim](https://wordpress.org/support/users/pizdin_dim/)
 * (@pizdin_dim)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-or-in/#post-481766)
 * 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>';`
 *  [Pizdin Dim](https://wordpress.org/support/users/pizdin_dim/)
 * (@pizdin_dim)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-or-in/#post-481771)
 * 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.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [T_STRING](https://wordpress.org/support/topic-tag/t_string/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Pizdin Dim](https://wordpress.org/support/users/pizdin_dim/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-t_string-expecting-or-in/#post-481771)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
