PHP Code to Post Variable to PHP Without Form or Controls

PHP Code [2] Ways to Send Variables to PHP Without Having to Have or Form or Any Input Controls on the Web Page

Home Short:

This first method of doing a php post without a form involves using FormData() constructor which essentially sends post data to php without having to have a form or any controls on the web page. Its an effective way to submit data to php tricking php into thinking its form data.

This second method of sending post data/javascript variables to php is sort like a hybrid between a POST and a GET request, even though it is really a POST request.

Of course dont forget to include the rest of the required ajax request Javascript code ...

S
H
A
R
E