Forum Moderators: open
If the data you are getting from your user is not in a <form> (not likely, but possible), then create a form, set action to url of php script, pass the javascript-acquired data to a hidden parameter <input type=hidden .....>, then trigger the submission of the fom with an event handler.