By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,573 Members | 938 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,573 IT Pros & Developers. It's quick & easy.

getting javascript-generated input element values with POST (php)

P: n/a
I'm having some problems.. I have some javascript generated input
elements with dynamic names and values.

ex:
<input name = "t1Name" .../>
<input name = "t2Name" .../>
.....
<input name = "tnName".../>
On submission, i'm trying to get the values in a php script using
$_POST and I can't get any values out of them.. always getting null.

Is it even possible to get javascript-generated input values using
php?

Thanks,
Ben
Jan 24 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Ben Brown wrote:
I'm having some problems.. I have some javascript generated input
elements with dynamic names and values.

ex:
<input name = "t1Name" .../>
<input name = "t2Name" .../>
....
<input name = "tnName".../>
On submission, i'm trying to get the values in a php script using
$_POST and I can't get any values out of them.. always getting null.

Is it even possible to get javascript-generated input values using
php?

Thanks,
Ben
Hi Ben,

From PHP (where the action in the form posts to), try this:
echo "Post contains:<pre>";
print_r($_POST);
echo "</pre>";
exit;

That way you will see WHAT the form has posted.

If you do not see your t1Name in that array, your form DIDN'T post it at
all.

Good luck.

Regards,
Erwin Moller
Jan 25 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.