Tracking your users with Ajax, PHP and MySQL

5

Index

Stats

13,316 visits, 36,505 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 27 Nov, 2015. Last updated 19 Feb, 2019

The output

Now to see if it worked. Go back to your phpMyAdmin and click on browse. If it all worked properly, you should now see some new data that looks something like this:

Those two lines you see with ID# 15 and 16 in the image are connections made by the Ajax plugin to the .php script which added them to the database (I smudged out my IP address).

If you didn't get these results, make sure you check the directory where you uploaded your .php file. If there's an error.dat file, then the .php script ran into problems and should tell you why.

  • 2 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • I have GoDaddy to host my website..

    Is it possible to create a BLANK MySQL database, then just copy it when I have a new user?

    I want each user to have their own MySQL database to save ALOT of data in.

  • Thanks a lot - VERY helpful! :)

    Just to note that lines 2-5 in your MySQL codearen't recognized as correct SQL code.

    Are they important? can you update how should they look now?