I have a page that give point to users. When the sum of users points reaches 10000 points, I have to execute an independent code.
I'ld like that when I execute the code that adds user points (add_userpoint.php) could say to the page that checks 10000 points are reached (check_goal.php) to execute its code. The problem is that I don't want that "add_userpoint.php" waits "check_goal.php" execution, because it doesn't need information from it.
How I could do? Can CURL or shell_exec('php check_goal.php');
makes what I want?
Thank you!
Asked
Active
Viewed 40 times
0

ProtoTyPus
- 1,272
- 3
- 19
- 40
-
1It sounds like a job for [Ajax](http://www.w3schools.com/xml/ajax_intro.asp) – WEBjuju Dec 15 '16 at 15:17
-
I'm really idiot... You are right... How I haven't thought to it? D: Thank you! – ProtoTyPus Dec 15 '16 at 15:18
-
@WEBjuju do you know if PHP can run ajax? Or i have to use – ProtoTyPus Dec 15 '16 at 15:20
-
1Ajax = "Asynchronous Javascript". I recommend using [jQuery](http://stackoverflow.com/questions/9436534/ajax-tutorial-for-post-and-get) since that will ease your learning curve and provide you with a wealth of examples. In short, you use Javascript to make a call back to your PHP. – WEBjuju Dec 15 '16 at 15:23
-
Mh, okay, so I have to use jQuery and AJAX! Thank you! I'm an idiot because I know jQuery, but I have not thought to it! – ProtoTyPus Dec 15 '16 at 15:27