View Full Version : Simple MySql Query needed for newbie

01-25-2012, 01:04 AM
Not new to programming but I am to JQuery (and j/script in general).

I need to query a mysql database to return a small amount of data (some text) based on a user code (e.g. MrABC).

I could use an iFrame and PHP but if the internet connection is down I do not want error messages displayed - the intended audience have limited cognitive capabilities and will not cope with ERROR 404 etc...

Essentially I need to be able to create a function that can be called with a parameter of the usercode and which returns the text from the lookup. What I put in the function is a complete mystery to me ...

Old Pedant
01-25-2012, 01:26 AM
Ummm...but then you should be asking this in the MySQL and/or PHP forums, no?

I mean, presumably you know what the JS side of things should be doing? That is, use $.get() or $.post() with jQuery to send the request to the server?