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
https://forums.phpfreaks.com/topic/247961-read-a-text-area-without-submitting/
Share on other sites

  Quote

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.