Jump to content

Passing variables to script


stijn0713

Recommended Posts

I hava an input file.

 

In there, they select e.g. 5 and then 5 inputfields appear. I generate them in a javascript with an onchange event on the select element.

 

But now i wonder how i have to collect these inputs in the php script?

 

If you have defined fields you can pass them via $_POST with the action element, now i'm a little confused

Link to comment
https://forums.phpfreaks.com/topic/264628-passing-variables-to-script/
Share on other sites

It was a very brief question.

 

You should use AJAX if you don't want the user to go to the posting page.

You should use submit the form otherwise. Any changes made via JavaScript should be posted along with it.

 

JavaScript can create a POST request, and it's well documented.

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.