[Nottingham] Into php5 and ajax

Raphael Gangneux nlug at domainarena.net
Wed Aug 30 11:28:57 BST 2006

>For someone new to php5 and also new to ajax, can anyone give any pointers
to some brief docs/tutorials to get started with them please?
>This is so that I can take a quick look before perhaps diving in! :-)

Hi Martin,

I have a mate (also a member of this list actually but god knows why he
replied to me instead of you!) who can't resist helping people with this
kind of things. Here's what he said:

Well, in all honesty if you're new to PHP and new to AJAX, then you must
also be new to JavaScript, DHTML, CSS and probably MySQL.

The basic idea behind AJAX is that you have your pages generated by PHP as
normal, and these pages have JavaScript scripts running on them that access
'special' PHP scripts on your server (special = scripts that you don't see
from your browser, that provide specific output for your JavaScript scripts
to do cool stuff with, mainly XML).

When these JavaScripts have got their special data from the special PHP
scripts, this data is in some way displayed to the user. One example might
be that if you're coding a search engine in PHP, each time you type another
letter into the search box (think Google Suggest), JavaScript sends an AJAX
request (or more accurately, an XMLHTTP request) to the special PHP script
which returns a plain text document of suggestions, each on a new line.

When your JavaScript gets this plain text document, it might use some DHTML
or CSS or both to show you the suggestions in a DIV that's neatly positioned
underneath the text input box.

That's one example, and it's quite a basic one. Another might be after
you've just put in your house number and postcode into a form to order to
goods, you press 'Find Me!' and it automatically fills in the Street, City,
District, County etc etc so you don't have to type it in, all via XMLHTTP
requests. It's cool stuff!

This helped me quite a bit:


Let us know if you want any more info!


So there you go :-)


More information about the Nottingham mailing list