This is a simple social network, built using PHP and MySQL.
The main functionalities and server side logic has been implemented using PHP.
The layout of the social network has been built with HTML5. Design, style as well as responsivness was implemented with Bootstrap 4.
The database has been built using MySQL engine.
- Move the social_network folder to your htdocs folder.
- Start your apache web server and MySQL database in XAMPP.
- Database setup:
- Go to your phpmyadmin, create a database called
social network
. - Next, select the database and go to
import
. - Then you can select the file from which you want to import with
choose file
button. Select the filedb.sql
, you can find it undersocial_network/db.sql
. Pressgo
and all the tables and demo data should have been created. - Make sure the primery key (id) in the
comments
table is set to auto_increment.
- The project assumes the database user with following credentials exists: username: socialNetwork, password: 1234. If not, follow the steps bellow for configuration:
- Go to
social_network/config/dbaccess.php
- Edit the
$USERNAME
and$PASSWORD
variables, set them to a database user who has access to your MySQL.
- Go to your webbrowser and go to your localhost. The social network should be displayed.
You can use the following users to access the social network:
- username:
admin
, password:123456
- username:
user
, password:123456
Or you can register yourself using the link<YOUR_XAMPP_ADDRESS>/social_network/index.php?action=register
Contains all functionalities needed to query, update, delete or insert data into the database.
This class serves as a model for comments. It contains getters and setters for the comment model.
This class serves as a model for the posts. It contains getters and setters for the post model.
This class serves as a model for the users. It contains getters and setters for the user model.