![]() |
How can i get data from a mysql database with ajax
Hello all i am trying to load random testimonials i have stored in my database but i can't seem to get it to work. it works like this random content shown without page refresh.
Code:
<script type="text/javascript">PHP Code:
|
Call me crazy but I don't see anywhere that your PHP returns any response text at all. Ajax sends data to your server but your server will do the query and should send some text back. You can use the echo function to produce this response text (there are probably other ways as well).
There also might be other issues with your code, this is just what I saw first. |
| All times are GMT +1. The time now is 10:00 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.