Skip to content

joaogsleite/php-mysql-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP + MySQL Website Example

Config project

  • Edit web/config.php with your database details
$db_host = "localhost";
$db_user = "username";
$db_pass = "password";
$db_name = "database";
  • Place web/ folder in your apache server

  • Init database with init/tables.sql

$ mysql -h hostname -u username -ppassword
mysql> use database;
mysql> source tables.sql;

Run project

  • Insert example data in database (init/insert_data.sql)
$ mysql -h hostname -u username -ppassword
mysql> use database;
mysql> source insert_data.sql;
  • Browse to http://hostname/index.php