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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.