Jump to content

$_POST['txtbox1'] to array


Recommended Posts

Is there any way to store variable in array,

 

I have set for loop in javascript to display textbox on form (textbox may be display from 1 to 5 depending on users requirement)

 

Now I want to add those textbox value to database.

 

is there any way to store that values in array so that I can use loop to run 'insert statement'

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/264381-_posttxtbox1-to-array/
Share on other sites

Is there any way to store variable in array,

$_POST is already an array.  try var_dump($_POST); and you'll see for yourself.

 

If you're wanting JS to do actions on your form before it's submitted, you can grab the value of it stupid simply with something like:

var textarea = $('#textarea').val();

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.