Jump to content

Is it possible to get textarea value without submitting?


pneudralics

Recommended Posts

I was wondering if it's possible to get the value from a textarea without a user submitting. I have a page that automatically populates the textarea with some stuff. I was wondering if I can some how get the values from the textarea.

<textarea name="textarea">
some stuff goes here
</textarea>
<?php
//php goes here to get "some stuff goes here" from textarea
?>

Get the value where? Your question does not exactly have a question in it. And if you mean get the value on the web server, you must somehow send the value to the server in a http/https request. That is the only way that information can get from a browser to a web server.

You could use some simple JavaScript to do it maybe. Depends on what you want to do with the result data... If you really need to assign the data to a PHP variable, then you'll have to use AJAX, or re-submit the page in a hidden IFrame or something similar :)

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.