This is a discussion on Ajax and mysql and PHP, pulling info from a database within the Coding Help forums, part of the Webmaster Help category; hey every1 I was just wondering how I would go about using Ajax to pull information from a mysql database. ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hey every1 I was just wondering how I would go about using Ajax to pull information from a mysql database. Basicly I have a page and I want to be able to click links and that the pages content pages with out reloading.If any1 could give me some example code or send me a link of a good turoial. Kind Regards Ciaran Mc Cann |
| |||||
| Ajax is not as complicated as you think. You use the onclick function to fill the data into a page. The only complicated part is to make the page still usefull if the user doesn't have javascript or activeX enabled. there is a simple tutorial i wrote about that: Code_sample | AJAX | Web Development Ireland, Web Design Ireland, Website Design Dublin, SEO | Eire-WebDesign.ie | | If i get a chance tomorrow i wil put something togheter for you.
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |
| |||||
| I put together a sample for you here: Ajax get content sample - Eire Web Design Ireland you can look at the source code to get the idea. Let me know if you have any questions. |
| ||||
| Erm I have question/problem, I need to be able to pass a value to the script in the php file. Any id so that it know which information to take out, you see I have sorta mulitpe choices of data. like placing it on an url isnt going to work i.e myphpfile.php?id=$id any idea's , is there a way to pass variables in js ? |
| |||||
| you don't need to pass the QS for js file but for the php file. All js file does is getting the data from the php file for display. if you pass a querystring to the php it should work just fine. |
| |||||
| have a look at the demo again. I change it to allow QS Ajax get content sample - Eire Web Design Ireland BTW this has nothing to do with the Ajax but is all php |