I've been breaking making websites for over 15 years.

Mimic AJAX Form Posts with PHP, Javascript, and Cookies

I was recently reading various articles on how to load external pages using javascript and loading the results into a container div, mimicing that aspect of AJAX requests. But the main complaint I read was that you couldn’t POST. I thought it would be neat to figure out a way to do this, so after toying around with a few ideas, I came up with this dirty little method of posting form fields through javascript, passing the fields and values to php script through cookies, placing them into the $_POST array, and proceeding with business as usual.

Note that this method requires that the user has Javascript and cookies enabled. Also note that there is absolutely NO USE of the XmlHttpRequest object.
Read more


PHP/AJAX – Instant DB Query and Results

This tutorial will teach you how to use PHP and the XMLHttpRequest object [AJAX] to query a database for a value and display a result on the screen without having to refresh the page.

In this particular example, we’re doing a simple query in the style of Google(tm) – Checking for the availability of a username during account registration.
Read more