garry Posted May 28, 2008 Share Posted May 28, 2008 So this is my code, the user should submit a textarea and then I should be able to get the results on the next page. The form is to update a review. The problem is, whilst I get all the other data fine, the textarea retains the data ($body) that was initially put into it and does not update on the next page. Any idea why? <form action="<?php $_SERVER['PHP_SELF']; ?>" method="POST"> <table width="615" border="0"> <tr> <td><div align="right">Album: </div></td> <td><input type="text" name="album" value="<?php echo $album; ?>"></td> <td><input type="hidden" name="albumid" value="<?php echo $albumid; ?>"></td> <td><input type="hidden" name="reviewid" value="<?php echo $reviewid; ?>"></td> </tr> <tr> <td><div align="right">Review: </div></td> <td><textarea name="body" rows="20" cols="80"><?php echo $body; ?></textarea></td> </tr> <tr> <td height="33"><input name="submitted2" type="hidden" value="1"></td> <td><input name="submit" type="submit" value="Edit" /></td> </tr> </table> </form> Thanks! Link to comment https://forums.phpfreaks.com/topic/107584-solved-using-php-to-get-submitted-info-from-textarea/ Share on other sites More sharing options...
garry Posted May 28, 2008 Author Share Posted May 28, 2008 come one.. can't anyone help? i'm sure it's only simple Link to comment https://forums.phpfreaks.com/topic/107584-solved-using-php-to-get-submitted-info-from-textarea/#findComment-551468 Share on other sites More sharing options...
kev wood Posted May 28, 2008 Share Posted May 28, 2008 i have done something similar with text box's. what i used this for was getting a user to fill write some text and upload an image to go with it. when they moved to the next page the text was displayed with the image. how i done this if i can remember properly was to set the text area up <textarea id="broad_messagebody1" name="broad_messagebody1" cols="50" rows="10" ></textarea><br /> this page was then submitted using a form and when i wanted to display the text i created a span class .mainTxt {font-size: 11px; color:#444444; font-family: Arial, Helvetica, sans;} and then the code to display the text was <span class="mainTxt">' . $broad_messagebody1 . '</span> Link to comment https://forums.phpfreaks.com/topic/107584-solved-using-php-to-get-submitted-info-from-textarea/#findComment-551485 Share on other sites More sharing options...
garry Posted May 28, 2008 Author Share Posted May 28, 2008 Thanks for your help but I've solved it now! Turns out the code I had was right, I was just calling my tinymce editor function twice on the page which screwed it up, all fixed now though. Thanks again! Link to comment https://forums.phpfreaks.com/topic/107584-solved-using-php-to-get-submitted-info-from-textarea/#findComment-551489 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.