lofaifa Posted March 26, 2012 Share Posted March 26, 2012 ..and its not working (i replaced <textarea> with <div> to apply some html tags inside it ) and this is my form : <form action="proc.php" method="post"> <div id="text" name="question_text" class="text" contenteditable="true"></div> </form> but when i submit some text the $_POST['question_text'] is not set ! Quote Link to comment https://forums.phpfreaks.com/topic/259755-send-data-in-a-form-using-div/ Share on other sites More sharing options...
AyKay47 Posted March 26, 2012 Share Posted March 26, 2012 this actually made me laugh. That is not how it works. Inputs are used to send form data, not divs. Quote Link to comment https://forums.phpfreaks.com/topic/259755-send-data-in-a-form-using-div/#findComment-1331307 Share on other sites More sharing options...
lofaifa Posted March 26, 2012 Author Share Posted March 26, 2012 textarea can send data also .. anyway im having the problem of making changes inside textarea .. i couldnt do that cuz textarea considers everything a test so if i write something like this <textarea><b>test</b></texterea> it wont work , it will display <b>test</b> soo i need something like textarea that let html tags work ! any advice ? Quote Link to comment https://forums.phpfreaks.com/topic/259755-send-data-in-a-form-using-div/#findComment-1331323 Share on other sites More sharing options...
smerny Posted March 26, 2012 Share Posted March 26, 2012 where do you want "test" to become bold? immediately after the <b> tags are written, within the textarea? it's not clear what you are trying to do Quote Link to comment https://forums.phpfreaks.com/topic/259755-send-data-in-a-form-using-div/#findComment-1331328 Share on other sites More sharing options...
AyKay47 Posted March 26, 2012 Share Posted March 26, 2012 textarea can send data also .. anyway im having the problem of making changes inside textarea .. i couldnt do that cuz textarea considers everything a test so if i write something like this <textarea><b>test</b></texterea> it wont work , it will display <b>test</b> soo i need something like textarea that let html tags work ! any advice ? this is because a textarea accepts text as plain/text instead of html. There are ways to convert the text in a textarea to html, what exactly are you trying to do? Quote Link to comment https://forums.phpfreaks.com/topic/259755-send-data-in-a-form-using-div/#findComment-1331357 Share on other sites More sharing options...
lofaifa Posted March 26, 2012 Author Share Posted March 26, 2012 its related to javascript in fact . i want two button .. if you click on one the direction of writing inside the textarea changes .. and when u finished with writing in the current direction and u wanna go back to the normal direction u click and u go back <textarea dir="rtl"></textarea> is the normal and when u click a div tag with direction "ltr" or something appears to do the job . when u click the other button u get out of that tag to the normal case . Quote Link to comment https://forums.phpfreaks.com/topic/259755-send-data-in-a-form-using-div/#findComment-1331391 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.