Jump to content

simple problem. but driving me mad.


jackappleby

Recommended Posts

sorry for this most basic of problems, i am a beginner.

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'

 

I recieve above error from this code...

 

<?
if($session->logged_in){
?>
<div class="editable_element">
<?
echo '<a onmouseover="popup(' . "'<i>Click to edit. Click again to close text box</i>'" . ')" onmouseout="kill()" onfocus="this.blur()" href="#">';

	$data = mysql_query("SELECT * FROM content")
	or die(mysql_error()); 
	$info = mysql_fetch_array( $data );
	print "".$info['content_index'] ."</a>"; 
?>

</div>

<?
echo '
<div class="editable_element_send">
<div>
<form action="account/insert2.php" method="post">

$oFCKeditor = new FCKeditor('content_index');
$oFCKeditor->BasePath = 'fckeditor/';
$oFCKeditor->Value = 'type here';
$oFCKeditor->Create();

</form>
</div>
</div>		
';}
?>

 

The syntax error is located somwhere around the $oFCKeditor = new FCKeditor('content_index'); part. I'm a complete novice I'm afraid, so I'm looking for someone to just correct the syntax error, if possible.

 

thanks a lot

 

Link to comment
https://forums.phpfreaks.com/topic/111691-simple-problem-but-driving-me-mad/
Share on other sites

you have to stop and restart the echo after the PHP code:

 

<?
echo '
  <div class="editable_element_send">
  <div>
<form action="account/insert2.php" method="post">';

$oFCKeditor = new FCKeditor('content_index');
$oFCKeditor->BasePath = 'fckeditor/';
$oFCKeditor->Value = 'type here';
$oFCKeditor->Create();

echo '</form>
  </div>
  </div>    
';}
?>

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.