HighDots Forums  

PHP gBook script

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss PHP gBook script in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joso webforumsuser@macromedia.com
 
Posts: n/a

Default PHP gBook script - 07-13-2003 , 12:07 PM






hey, im using the following script for a PHP gBook but every time someone enters they're details and clicks submit it come's up with an error messgae saying 'Parse Error line 21'. I'm still learning when it comes to PHP scripts and was wondering if someone could help me out thanks, id really aprreciate it....

PHP Code:
<?php
if ($message != '')
{
$message str_replace ("\n","<br>",$message);
$message strip_tags ($message'<br>');

$newRow '<div class="viewGuestbook">' '<table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="left" valign="top">'
strip_tags ($name) .'</td>
</tr>
<tr>
<td align="left" valign="top"></td>
</tr>'  
.
'<tr>
<td align="left" valign="top">'
. ($message) .'</td>
</tr>
<tr>
<td align="left" valign="top"></td>
</tr>'
'<tr>
<td align="right" valign="top">'
date('d.m.Y') .'</td>
</tr>
</table></div>'
;

$oldRows join (''file ('guestbook.txt') );
$fileName fopen ('guestbook.txt''w');
fputs ($fileName$newRow chr(13) . chr(10) . $oldRows);
fclose ($fileName);
}

include (
"guestbook.php");
?>



Reply With Quote
  #2  
Old   
Scott Fegette
 
Posts: n/a

Default Re: PHP gBook script - 07-13-2003 , 02:27 PM






Have you tried removing the parentheses from around this variable?
Quote:
. ($message) .
You're not passing $message as an argument to anything (as you did with
$name, which you're passing to a strip_tags() function two cells
earlier), so removing those parens may solve your problem right there
(just eyeballing it, tho)...

-Scott
Macromedia, Inc.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.