Hi all!
Has anyone see web sites where you type somethign in a text area, just like this ones on this web site...
Typing stuff just like this
you submit the form
and you see what you typed... how you typed it ,.... on the web site...
How do you do that?
I have heard of this PHP function called Tidy... but not sure if thats what i need or something else??
Thanks!
textarea typing translated into HTML ?????
Moderator: General Moderators
- shiznatix
- DevNet Master
- Posts: 2745
- Joined: Tue Dec 28, 2004 5:57 pm
- Location: Tallinn, Estonia
- Contact:
never saw any of those websites before...
no actually its quite easy, somthing like this will do it:
after you grasp that idea you can then move on to storing that data! this forum uses mysql to save its data then uses php to display the data.
no actually its quite easy, somthing like this will do it:
Code: Select all
echo (empty($_POST['msg']) ? '' : $_POST['msg']);
?>
<form action="this_page.php" method="post">
Message: <input type="text" name="msg">
<input type="submit" value="submit">
</form>anything you type into a form like that you mentioned is POSTed to a page that filters/manipulates the data
say you had this form
When whatever they typed in is submitted, it's passed to an array named $_POST.
The value that the person typed in would be in $_POST['text'] (since that's what we named our textarea).
You could do this
and it would display -- in HTML -- what the person typed into the textarea box.
say you had this form
Code: Select all
<form action="thispage.php" method="post">
<textarea name="text"></textarea>
<input type="submit" value="submit">
</form>The value that the person typed in would be in $_POST['text'] (since that's what we named our textarea).
You could do this
Code: Select all
echo "<p>This is what you typed in: {$_POST['text']}</p>";Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Thanks for the replies.... not quite what i am looking for...
Have you ever been on mySpace.com ?
You type what you want in a text area and submit.
I guess what i am refering to is the format of the text. Like right now i am typing on multiple lines. In a normal text area everything i am typing right now would be concatinated together,,, not on seperate lines like i am writing it now.
I want to hold the format i am typing this message in... Display the data the way its typed... content and format.
Does that make more sense?
Thanks!
Have you ever been on mySpace.com ?
You type what you want in a text area and submit.
I guess what i am refering to is the format of the text. Like right now i am typing on multiple lines. In a normal text area everything i am typing right now would be concatinated together,,, not on seperate lines like i am writing it now.
I want to hold the format i am typing this message in... Display the data the way its typed... content and format.
Does that make more sense?
Thanks!