0

Help Me with This Simple PHP Code

I am new at PHP and I wanted to make website that allows users to sign up and start to earn points when they click a button and store it. I'm thinking like the xp points we get on sololearn. after they log out I want them to keep the score (xp) , is it possible??

7th Jun 2020, 7:57 PM
Yokahana
Yokahana - avatar
4 Antworten
+ 1
You might store the data in a database. 1. Install a Database Management system like MySQL or PostgreSQL 2. Learn about PDO objects and how to use them to create, retrieve, update and delete records from database. Optionally, you may store the data in a file on your server.
8th Jun 2020, 7:09 AM
Ore
Ore - avatar
+ 2
Yes - since php is a server sided language and communicates with the database, you should be able to do it. First, you need a html form for login Then you need a form (or button) and using the $_POST method, add +1 to the database. You can try using xampp and phpMyAdmin to create a dB. Simply connect with php and assign clicks as increments to the database
7th Jun 2020, 8:41 PM
HNNX 🐿
HNNX 🐿 - avatar
+ 2
This is only be possible with Database... And it will be little long code... First install any Apache server like Xampp, Wamp or other... [ Setup Apache web server ] Then Code a Signup form with post method in html and add Action page of php... and go to phpmyadmin and create a db then connect your application with database then create the needed table and rows for users... then code register and store user details in db via insert query in your application and xp points to the row... for more help search on YouTube...
7th Jun 2020, 8:41 PM
XnDesigns
XnDesigns - avatar
+ 2
XnDesigns reading my mind while I type my post? 😁
7th Jun 2020, 8:58 PM
HNNX 🐿
HNNX 🐿 - avatar