lundi 2 novembre 2015

Using AJAX how do I assign PHP variables in jQuery from a different page

What I'm doing is having a page that keeps track of SQLite variables and I want to do this without refreshing my page. Putting variables into SQLite is easy, I found a script that explains that and I got that part down pat. Retrieving the variables and refreshing them without refreshing the page seems to be the hard part.

I know I need to have jQUery refresh a or something with the setInterval command, that's no biggie. I have NO idea how to get jQuery to take variables out of a php document that keeps them to do this.

I know if you have one variable you can echo it and use JSON to get the variable. That's not what I need. I've spent hours on Google wording and rewording this question and I see lots of people saying to others "Oh that's easy with AJAX" but I've not found any actual direct answers on how AJAX can do this.

I can't even find it in the documentation.

TL;DR I need to take hundreds of PHP variables from, let's call it variables.php and use jQuery to put those variables into var whatever.

Aucun commentaire:

Enregistrer un commentaire