Everything you need.....
Use the code SBSP provided.
Use your php debugger and set a breakpoint on line 3 of checkinput.php
.
Use developer tools and put a breakpoint in the index.php file in the xmlhttp.onreadystatechange function (the lines with "if (xmlhttp.readyState == 4 && xmlhttp.status == 200)" )
Also put breakpoints on the first lines of each javascript function.
Run the script and as soon as you submit the form you should hit the javascript breakpoint. Step through this and see what happens. When you get to the xmlhttp.send function then your php debugger should kick in as it's sent the info to the php script.
tell the developer tools debugger to continue running, it'll carry on doing "nothing" (waiting around).
Step through the php code and when it returns then your javascript debugger should "magically" wake up again as it's now got something to do - handle the received data.
Check what's in the different variables returned, etc.
Currently the php script is returning a string. You could have it return anything.
Most likely you want it to return a json array of data that you can then work with in your javascript.
