├── .DS_Store ├── Database SQL File ├── .DS_Store └── sonicTechStore.sql ├── PHP Files ├── .DS_Store ├── checkout.php ├── contact.php ├── dbconnect.php ├── footer.php ├── header.php ├── home.php ├── index.php ├── ipadair.png ├── ipadpro.png ├── iphone7.png ├── iphone7s.png ├── logout.php ├── macbookair.png ├── macbookpro.png ├── menu.php ├── orderResult.php ├── product.php ├── register.php ├── shop.php ├── style.css ├── success.php └── yourcart.php └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoanganhkhoil/PHP-MySQL-Shopping-Website/4d7278dc4128221085b31b8229426b0a770ab820/.DS_Store -------------------------------------------------------------------------------- /Database SQL File/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoanganhkhoil/PHP-MySQL-Shopping-Website/4d7278dc4128221085b31b8229426b0a770ab820/Database SQL File/.DS_Store -------------------------------------------------------------------------------- /Database SQL File/sonicTechStore.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.5.2 3 | -- http://www.phpmyadmin.net 4 | -- 5 | -- Host: localhost 6 | -- Generation Time: Apr 28, 2017 at 11:40 PM 7 | -- Server version: 10.1.19-MariaDB 8 | -- PHP Version: 5.6.28 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET time_zone = "+00:00"; 12 | 13 | 14 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 15 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 16 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 17 | /*!40101 SET NAMES utf8mb4 */; 18 | 19 | -- 20 | -- Database: `sonicTechStore` 21 | -- 22 | 23 | -- -------------------------------------------------------- 24 | 25 | -- 26 | -- Table structure for table `Customers` 27 | -- 28 | 29 | CREATE TABLE `Customers` ( 30 | `customerID` int(11) NOT NULL, 31 | `userName` varchar(150) NOT NULL, 32 | `userPassword` varchar(150) NOT NULL, 33 | `customerName` varchar(150) NOT NULL, 34 | `customerAddress` varchar(250) NOT NULL, 35 | `customerPhone` varchar(25) NOT NULL, 36 | `customerEmail` varchar(150) NOT NULL 37 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 38 | 39 | -- 40 | -- Dumping data for table `Customers` 41 | -- 42 | 43 | INSERT INTO `Customers` (`customerID`, `userName`, `userPassword`, `customerName`, `customerAddress`, `customerPhone`, `customerEmail`) VALUES 44 | (4, 'admin', '$2y$10$Tie25.ymNVYejl6ggDsIieA70ZeDL54iBiDdicE05ufCuUhLZhpha', 'Khoi Hoang', '12 Sandra Ct', '2407162326', 'hoang@gmail.com'); 45 | 46 | -- -------------------------------------------------------- 47 | 48 | -- 49 | -- Table structure for table `Products` 50 | -- 51 | 52 | CREATE TABLE `Products` ( 53 | `productID` int(11) NOT NULL, 54 | `productName` varchar(50) NOT NULL, 55 | `productPrice` double(10,2) NOT NULL, 56 | `productImage` varchar(250) NOT NULL 57 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 58 | 59 | -- 60 | -- Dumping data for table `Products` 61 | -- 62 | 63 | INSERT INTO `Products` (`productID`, `productName`, `productPrice`, `productImage`) VALUES 64 | (1, 'Iphone 7', 699.00, 'iphone7.png'), 65 | (2, 'Iphone 7s', 799.00, 'iphone7s.png'), 66 | (3, 'Ipad Air', 599.00, 'ipadair.png'), 67 | (4, 'Ipad Pro', 899.00, 'ipadpro.png'), 68 | (5, 'Macbook Air', 999.00, 'macbookair.png'), 69 | (6, 'Macbook Pro', 1399.00, 'macbookpro.png'); 70 | 71 | -- 72 | -- Indexes for dumped tables 73 | -- 74 | 75 | -- 76 | -- Indexes for table `Customers` 77 | -- 78 | ALTER TABLE `Customers` 79 | ADD PRIMARY KEY (`customerID`); 80 | 81 | -- 82 | -- Indexes for table `Products` 83 | -- 84 | ALTER TABLE `Products` 85 | ADD PRIMARY KEY (`productID`); 86 | 87 | -- 88 | -- AUTO_INCREMENT for dumped tables 89 | -- 90 | 91 | -- 92 | -- AUTO_INCREMENT for table `Customers` 93 | -- 94 | ALTER TABLE `Customers` 95 | MODIFY `customerID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; 96 | -- 97 | -- AUTO_INCREMENT for table `Products` 98 | -- 99 | ALTER TABLE `Products` 100 | MODIFY `productID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; 101 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 102 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 103 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 104 | -------------------------------------------------------------------------------- /PHP Files/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoanganhkhoil/PHP-MySQL-Shopping-Website/4d7278dc4128221085b31b8229426b0a770ab820/PHP Files/.DS_Store -------------------------------------------------------------------------------- /PHP Files/checkout.php: -------------------------------------------------------------------------------- 1 | alert("Your cart is empty.")'; 10 | echo ''; 11 | } 12 | 13 | //Check if user already logged in. Jump to orderResult.php page. Otherwise, show log in require. 14 | else if (isset($_SESSION['userSession'])!="") { 15 | header("Location: orderResult.php"); 16 | exit; 17 | } 18 | ?> 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
Sonic Tech Store.
4200 Connecticut Ave NW, Washington, DC 20008