Skip to content

ivan-yosifov/pdo-basic-users

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDO Basic Users

This is a simple project that demonstarates the use of Create Read Update Delete (CRUD) functionality with PHP. We use the PDO extension to connect to MySQL database. Additionally we use prepared statements to prevent against SQL injection attacks.

The project allows us to add, view, update and delete users.

Usage

In order to use this project, you need to have a server installed on your computer. I use XAMPP.

Start XAMPP and make sure both Modules Apache and MySQL are running. xampp_modules

Then you need to create a database

In you browser go to localhost/phpmyadmin

Create a new database - test

new_database

Go to the SQL tab and paste the following query and click Go

CREATE TABLE `test`.`users` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `username` VARCHAR(255) NOT NULL , `email` VARCHAR(255) NOT NULL , `password` VARCHAR(60) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;

sql_tab

Then perform the following steps

  1. Download the project
  2. Place it inside the htdocs folder of your XAMPP installation
  3. Make sure XAMPP is running (both Apache and MySQL)
  4. In your borwser of choice enter localhost/pdo-basic-users-main

Enjoy

Screenshots

users

update-users

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages