I have a script that posts data to a php script:
xhr.open("POST","processData.php");
And i am sending once piece of data to it:
xhr.send(email);
How would a post multiple peice of data to the php scrip? Lets say i have the variable first and last name that i want to sent to be processed? I’ve tried this:
xhr.send(essay, firstName);
But not sure what to do with it in the PHP script, do i use the usual $_POST[‘essay’] to collect the values? what about encoding aswell?
Thanks for you help.
You create an object, and send that:
On server side you get: