stijn0713 Posted June 22, 2012 Share Posted June 22, 2012 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 Quote Link to comment Share on other sites More sharing options...
xyph Posted June 22, 2012 Share Posted June 22, 2012 You can use JavaScript to post those values to an external PHP file. Quote Link to comment Share on other sites More sharing options...
stijn0713 Posted June 22, 2012 Author Share Posted June 22, 2012 Ok, but that's very brief explanation. How should i do that? Quote Link to comment Share on other sites More sharing options...
xyph Posted June 22, 2012 Share Posted June 22, 2012 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. Quote Link to comment Share on other sites More sharing options...
stijn0713 Posted June 22, 2012 Author Share Posted June 22, 2012 Ok, ill do some more research then. Quote Link to comment Share on other sites More sharing options...
xyph Posted June 22, 2012 Share Posted June 22, 2012 Perfect, when you have a specific issue please post back. As of now, you're asking a very broad question that has more to do with client-server interaction than PHP itself Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.