dimanche 28 juin 2015

Dynamically reading and writing to a MySQL database?

I'm trying to figure out a way to dynamically load and write things from a MySQL database.

I've tried reading about AJAX, and JSON but both of these things seem to be a way to dynamically deliminate, format and output certain pieces of data from a source of data which has already been acquired using PHP.

I could be wrong, I'm pretty new to this kind of thing.

The only way I can think of to accomplish this task is to use JavaScript (or possibly something else) to simulate "loading" a PHP script over and over on a certain event, and injecting new variable values every time.

Even if this is the way to accomplish what I'm looking for I'm at a loss as to how I would do this.

My first thought was to use angular to repeatably import external PHP files into the current document, but this wouldn't really work either. PHP runs before everything else, so if we've already loaded the page any new PHP we add will be stagnant.

Is what I'm attempting possible? In what way would I accomplish it, and are there any online resources I can use to learn the process?

Aucun commentaire:

Enregistrer un commentaire