Jump to content

read a text area without submitting


Rokit

Recommended Posts

I'm trying to retrieve the text from a text area and put this in a PHP variable without submitting the form.  The text is provided by a database and I want to format it for the user.  How can I do this with PHP?

 

So basically:

 

<form id="createForm" name="createForm" method="post" action="">
  <textarea name="subjectTextArea" id="subjectTextArea" cols="45" rows="5">
    This is the text I want to put in a PHP variable before the form is submitted.
  </textarea>
</form>

<?php
  $txtArea = ?
?>

 

Thanks for the help.

 

 

Link to comment
Share on other sites

I agree with Requinix; however, the question could be read as how to populate the text area with content from the database ("The text is provided by a database and I want to format it for the user")

 

Oh ok, so it has to be submitted.  Yeah, I thought of that right after I posted, litebearer.  It would probably be better just getting the info straight from the database, then I can just format it and put it into the text area.  Thanks anyway guys.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.