czukoman20 Posted January 16, 2008 Share Posted January 16, 2008 Hi Everyone. I was just using a multiline textbox for php for my site, and i realized that it will not take any information after i hit the return key for a new line. Is there a way to record the information that involves starting new lines and such with a multiline textbox Quote Link to comment https://forums.phpfreaks.com/topic/86232-multiline-textbox/ Share on other sites More sharing options...
AndyB Posted January 16, 2008 Share Posted January 16, 2008 Sounds like a problem with your form processing code. You'll need to post the relevant parts of it if you need specific help. Quote Link to comment https://forums.phpfreaks.com/topic/86232-multiline-textbox/#findComment-440472 Share on other sites More sharing options...
czukoman20 Posted January 16, 2008 Author Share Posted January 16, 2008 ok all i have is a basic form here is the code for my textbox. <form id="form1" name="form1" method="post" action="<?php $_SERVER['PHP_SELF'] ?>"> <p> <textarea name="textarea" id="textarea" cols="45" rows="5">This is the default text..... change it and hit submit</textarea> </p> <p> <input type="submit" name="button" id="button" value="Submit" /> </p> </form> Quote Link to comment https://forums.phpfreaks.com/topic/86232-multiline-textbox/#findComment-440473 Share on other sites More sharing options...
Ken2k7 Posted January 16, 2008 Share Posted January 16, 2008 Can we see the PHP that process that form? Quote Link to comment https://forums.phpfreaks.com/topic/86232-multiline-textbox/#findComment-440480 Share on other sites More sharing options...
phpSensei Posted January 16, 2008 Share Posted January 16, 2008 Sometimes you might want to try <form id="form1" name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>"> But either way it would end up to be "", which will still post the form. We might want to examine your script processing the form as Ken said... Quote Link to comment https://forums.phpfreaks.com/topic/86232-multiline-textbox/#findComment-440491 Share on other sites More sharing options...
czukoman20 Posted January 16, 2008 Author Share Posted January 16, 2008 if(isset($_POST['button'])) { $Ecomments=$_POST['textarea']; echo "Extra Comments: $Ecomments\n"; } there is a lot more code involved, but this is only the code i used to transfer the info fromt eh textbox Quote Link to comment https://forums.phpfreaks.com/topic/86232-multiline-textbox/#findComment-440585 Share on other sites More sharing options...
priti Posted January 16, 2008 Share Posted January 16, 2008 ok all i have is a basic form here is the code for my textbox. <form id="form1" name="form1" method="post" action="<?php $_SERVER['PHP_SELF'] ?>"> <p> <textarea name="textarea" id="textarea" cols="45" rows="5">This is the default text..... change it and hit submit</textarea> </p> <p> <input type="submit" name="button" id="button" value="Submit" /> </p> </form> Hi, will you change your action tag to action="<?php echo $_SERVER['PHP_SELF']; ?>" and try becos i tried your code and could see the output. Regards Quote Link to comment https://forums.phpfreaks.com/topic/86232-multiline-textbox/#findComment-440605 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.