kobena Posted March 31, 2011 Share Posted March 31, 2011 Hi all, can anyone explain to me how i can preview and edit comments as in most of the codes in the book. Is it a problem with the textarea? Link to comment Share on other sites More sharing options...
Stuart Posted March 31, 2011 Share Posted March 31, 2011 Hi Kobena, You'll have to provide some more information on exactly what you're trying to do along with the source code you can't get to work - as your posts a little vague at the moment. I can't remember anywhere in this book that has a comments section unless you're talking about forum posts. The premise for allowing an edit of a comment would be exactly the same as a single string in a text input - the only difference is that you supply a value to a textarea differently than to a text input. E.g. Text input: echo '<input type="text" value="' . $value . '">'; Textarea: echo '<textarea name="comment">' . $value . '</textarea>'; If that's not the issue that you're encountering then, like I said you'll need to supply source code and post your software versions as per the forum guidelines. 1 Link to comment Share on other sites More sharing options...
kobena Posted March 31, 2011 Author Share Posted March 31, 2011 Hi Kobena, You'll have to provide some more information on exactly what you're trying to do along with the source code you can't get to work - as your posts a little vague at the moment. I can't remember anywhere in this book that has a comments section unless you're talking about forum posts. The premise for allowing an edit of a comment would be exactly the same as a single string in a text input - the only difference is that you supply a value to a textarea differently than to a text input. E.g. Text input: echo '<input type="text" value="' . $value . '">'; Textarea: echo '<textarea name="comment">' . $value . '</value>'; If that's not the issue that you're encountering then, like I said you'll need to supply source code and post your software versions as per the forum guidelines. Thanks. Exactly what i was looking for Link to comment Share on other sites More sharing options...
Stuart Posted March 31, 2011 Share Posted March 31, 2011 No worries, have just noticed the typo in my post </value> instead of </textarea> - have amended in my post but can't change the value in the quoted text for anyone referencing this post in the future. 1 Link to comment Share on other sites More sharing options...
Recommended Posts