Jump to content

Need to pass additional text with $_Post var via html textarea


simpson_121919

Recommended Posts

I have a web application that has about 700 rows, each rows has a html textarea for the user to add personal notes. I would like to pass text of some sort along with what the user typed typed into the textarea box.  I want it to be hidden from the user. Any ideas? Any help would be appreciated, I've been stuck on this one for awhile.

 

Thanks

Just stick a hidden input along with the textarea and have some method of associating the two, such as the database row's ID number.

 

<textarea name="textarea[<?php echo $databaseId; ?>]"></textarea>
<input type="hidden" name="hidden[<?php echo $databaseId; ?>]" value="whatever you want">
When the user submits you'll have two arrays as input, one containing the textarea content and one containing the hidden input's content. The arrays can be matched up with the database row's ID number.

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.