troubleshooting Question

Syntax Error  unexpected T_ECHO

Avatar of CAE5942
CAE5942 asked on
PHP
2 Comments1 Solution2415 ViewsLast Modified:
Hi everyone,

I'm trying to test a page with some php in it but I'm getting the following error:

Parse error: syntax error, unexpected T_ECHO in /Applications/MAMP/htdocs/newsite/admin/add_article.php on line 98

Line 98 is as follows:

[CODE]
                <td class="right"><textarea name="article" id="article"><?php (isset($_POST['article'])) echo $_POST['article']; ?></textarea></td>
[/CODE]

I wondered if someone could tell me what the error means or how to fix it?

Below is a larger block of surrounding code if it helps to troubleshoot.

Thanks for any help.

<body onload="P7_initPM(1,8,1,-20,10)">
<?php
if (isset($error)) {
  foreach ($error as $message) {
    echo '<p class="warning">'.$message.'</p>';
	}
  }
if(get_magic_quotes_gpc()) {
	foreach ($_POST as $key => $value) {
		$temp = stripslashes($value);
		$_POST[$key] = $temp;
		}
	}
?>
<div class="shadow">
  <div id="frame">
    <div id="header"> 
      <h3><img src="../images/phone.gif" alt="" />Call for an appointment: (02) 000 0000</h3>
	</div>
	  <div id="navtop">
	    <!--<ul id="p7PMnav">
          <li><a href="../index.php">Home</a></li>
	      <li><a href="../about_us.php">About Us</a></li>
	      <li><a href="../downloads.php">Downloads</a></li>
	      <li><a href="../price_list.php">Price List</a></li>
	      <li class="recommend"><a href="../rec_Practitioners.php" class="recommend">Recommended Practitioners</a></li>
	      <li><a href="../contact.php" id="noborder">Contact Us</a></li>-->
	      <!--[if lte IE 6]><style>#p7PMnav a{height:1em;}#p7PMnav li{height:1em;}#p7PMnav ul li{float:left;clear:both;width:100%}</style><![endif]-->
	      <!--[if IE 6]><style>#p7PMnav ul li{clear:none;}</style><![endif]-->
        <!--</ul>-->
	  </div>
	  <div id="enclose">
	    <div id="leftside"><!-- InstanceBeginEditable name="Content" -->
        <div id="columnMainInner">
	        <h1>Add an article  </h1>
           	
			<form method="POST" name="addArticle" id="addArticle" action="">
			<table>
              <tr>
                <td class="label">Title</td>
                <td class="right"><input value="<?php if (isset($_POST['title'])) echo $_POST['title']; ?>" type="text" name="title" id="title" class="widebox" /></td>
              </tr>
              <tr>
                <td class="label">Author</td>
                <td class="right"><select name="author" id="author">
                </select>
                </td>
              </tr>
              <tr>
                <td class="label">Publication date </td>
                <td class="right"><input value="<?php if (isset($_POST['pub_date'])) echo $_POST['pub_date']; ?>" name="pub_date" type="text" id="pub_date" /></td>
              </tr>
              <tr>
                <td class="label">Delete article </td>
                <td class="right">No 
      <input name="kill_article" type="radio" value="N" checked="checked" /> 
      Yes 
      <input name="kill_article" type="radio" value="Y" /></td>
              </tr>
              <tr>
                <td class="label">Article</td>
                <td class="right"><textarea name="article" id="article"><?php (isset($_POST['article'])) echo $_POST['article']; ?></textarea></td>
              </tr>
              <tr>
                <td class="label">&nbsp;</td>
                <td class="right"><input type="submit" name="Submit" value="Submit" /></td>
              </tr>
            </table>
            </form>
        </div>
		    <!-- InstanceEndEditable -->
	      <div id="columnLeft">
			    <ul>
			      	  <li><a href="admin_home.php">Admin Home</a></li>
				      <li><a href="add_user.php">Add  administrator</a></li>
				      <li><a href="add_article.php">Add article</a></li>
				      <li><a href="list_articles.php">List articles</a></li>
					  <li><a href="add_author.php">Add author</a></li>
				      <li><a href="list_authors.php">List authors</a></li>
				      <li><a href="list_subscribers.php">List subscribers</a></li>
		    </ul>
		<p>&nbsp; </p>
		<p>&nbsp; </p>
		<p>&nbsp; </p>
		<p>&nbsp; </p>
	      </div>
	    </div><div class="clear"></div>
	  </div>
	  <div id="footerinner"> © copyright 2008. All Rights Reserved  <!--&nbsp;|&nbsp; <a href="../terms_and_conditions.php">Terms and Conditions</a>  &nbsp;| &nbsp; <a href="../privacy_policy.php">Privacy Policy</a>  &nbsp; |&nbsp;  <a href="../contact.php">Contact Us</a>--></div>
  </div>
</div>
</body>
<!-- InstanceEnd --></html>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros