I have an image-based web directory: www.clicapic.com. and want the user to see a slideshow of the ads within each category as they hover over the category image. I need to run a script which will retrieve the images on hovering as preloading will take way too long. Is it possible to use javascript to access the MySQL database? If not, any ideas about how I could achieve this?
You can send data to PHP (the server) and execute a MySQL query, and receive the results with AJAX. Javascript itself runs on the server and cannot access the server or a database. en.wikipedia.org/wiki/Ajax_(programming)
Sounds good, pity I know nothing about AJAX, in fact my knowledge of JS is pretty limited too. The only code I'm really comfortable with is PHP and was hoping that there was a way to embed this in some JS code. Do you think it's possible to do the same with just PHP and JS?
AJAX is based on Javascript. There'd be only a few things you'd have to learn. However, can't you pull all data and store it in an Javascript array or something?
Here's a nice start. w w w.w3schools.com/ajax/default.asp (Remove the spaces, I'm not allowed yet to post links)