Larry Vollmer
asked on
Syntax Question
<? echo "<p>Review Text - You can edit this text: <br /><textarea cols=\"40\" rows=\"6\" name=\"reviewtext\" value =\".$rs['reviewtext'];?>.\ " /></textarea></p>
I keep getting an error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
I know I have an error around the "Value" part but I can't figure out what the problem is. Can anyone help out?
I keep getting an error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,
I know I have an error around the "Value" part but I can't figure out what the problem is. Can anyone help out?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
other option is to use {.. } for the variablename and not to use string concatenation
<? echo "<p>Review Text - You can edit this text: <br /><textarea cols=\"40\" rows=\"6\" name=\"reviewtext\" value =\"{$rs['reviewtext']}\""; ?> /></textarea></p>
<? echo "<p>Review Text - You can edit this text: <br /><textarea cols=\"40\" rows=\"6\" name=\"reviewtext\" value =\"{$rs['reviewtext']}\"";
ASKER
thanks guys
the value for a textares does NOT go withing a value attribute. It needs to go between <textarea> and </textarea>. This is what you need (copy and paste from here):
<?php echo "<p>Review Text - You can edit this text: <br /><textarea cols=\"40\" rows=\"6\" name=\"reviewtext\">{$rs[' reviewtext ']}</texta rea></p>";
<?php echo "<p>Review Text - You can edit this text: <br /><textarea cols=\"40\" rows=\"6\" name=\"reviewtext\">{$rs['
ASKER
hielo is right, i was wondering what I was doing wrong. perhaps I can get you some points.
ASKER
hielo - i get this error with that line of code:
Parse error: syntax error, unexpected '<' in /home/venuereview/approve. php on line 194
Parse error: syntax error, unexpected '<' in /home/venuereview/approve.
ASKER
never mind, I didn't close the php
ASKER
it still says it is closed?
echo "<p>Review Text - You can edit this text: <br /><textarea cols=\"40\" rows=\"6\" name=\"reviewtext\" value =\".$rs['reviewtext'];?>.\