Hi all,
Submitting forms to PHP is easy with Ajax. But what if I wanted to design my website to allow for JS-free web browsers?
If I call a PHP file with Ajax, I might get an error message in return to dynamically add to the page, but if I POST data to a PHP form without Javascript, I need to get a whole page of HTML back. Therefore, to allow for both, i would need a way for the PHP code to detect whether a request was an AJAX request or not.
How do I do this?