├── Database └── ecommerce_1.sql ├── README.md ├── admin ├── admin_images │ └── logo after 3d_2.png ├── admin_login.php ├── admin_logout.php ├── admin_resgistration.php ├── delete_brand.php ├── delete_category.php ├── delete_order.php ├── delete_payment.php ├── delete_product.php ├── edit_brand.php ├── edit_category.php ├── edit_product.php ├── index.php ├── insert_brands.php ├── insert_categories.php ├── insert_product.php ├── list_orders.php ├── list_payments.php ├── list_users.php ├── product_images │ ├── camera1.png │ ├── camera2.png │ ├── camera3.png │ ├── food1.png │ ├── food2.png │ ├── food3.png │ ├── havit1.png │ ├── havit2.png │ ├── lap1.png │ ├── lap2.png │ └── lap3.png ├── view_brands.php ├── view_categories.php └── view_products.php ├── assets ├── css │ ├── bootstrap.css │ └── main.css ├── images │ ├── bg.png │ ├── bgregister.png │ └── bgsecond.png └── js │ ├── bootstrap.bundle.js │ └── script.js ├── cart.php ├── functions └── common_functions.php ├── includes ├── connect.php └── footer.php ├── index.php ├── product_details.php ├── products.php ├── search_product.php ├── ui ├── Ecommerce-Admin-Dashboard (1).png ├── Ecommerce-Admin-Dashboard (2).png ├── Ecommerce-Admin-Dashboard (3).png ├── Ecommerce-Admin-Dashboard (4).png ├── Ecommerce-Admin-Dashboard.png ├── Ecommerce-Admin-Login.png ├── Ecommerce-Admin-Registration.png ├── Ecommerce-Cart-Details-Page.png ├── Ecommerce-Home-Page.png ├── Ecommerce-Products.png ├── abdo-Profile (1).png ├── abdo-Profile (2).png └── abdo-Profile.png └── users_area ├── checkout.php ├── confirm_payment.php ├── delete_account.php ├── edit_account.php ├── logout.php ├── order.php ├── payment.php ├── profile.php ├── user_images ├── logo after 3d_2.jpg └── new logo after Edit1920.jpg ├── user_login.php ├── user_orders.php └── user_registration.php /Database/ecommerce_1.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 5.2.1 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Oct 31, 2023 at 09:30 PM 7 | -- Server version: 10.4.28-MariaDB 8 | -- PHP Version: 8.2.4 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | START TRANSACTION; 12 | SET time_zone = "+00:00"; 13 | 14 | 15 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 16 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 17 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 18 | /*!40101 SET NAMES utf8mb4 */; 19 | 20 | -- 21 | -- Database: `ecommerce_1` 22 | -- 23 | 24 | -- -------------------------------------------------------- 25 | 26 | -- 27 | -- Table structure for table `admin_table` 28 | -- 29 | 30 | CREATE TABLE `admin_table` ( 31 | `admin_id` int(11) NOT NULL, 32 | `admin_name` varchar(100) NOT NULL, 33 | `admin_email` varchar(200) NOT NULL, 34 | `admin_image` varchar(255) NOT NULL, 35 | `admin_password` varchar(255) NOT NULL 36 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 37 | 38 | -- 39 | -- Dumping data for table `admin_table` 40 | -- 41 | 42 | INSERT INTO `admin_table` (`admin_id`, `admin_name`, `admin_email`, `admin_image`, `admin_password`) VALUES 43 | (1, 'abdo', 'abdo@gmail.com', 'logo after 3d_2.png', '$2y$10$M/A/r5j/GSeJrAZxI8NtRu9eG5yNltfgTrfQVoClfSIF/pzNUXa2W'); 44 | 45 | -- -------------------------------------------------------- 46 | 47 | -- 48 | -- Table structure for table `brands` 49 | -- 50 | 51 | CREATE TABLE `brands` ( 52 | `brand_id` int(11) NOT NULL, 53 | `brand_title` varchar(100) NOT NULL 54 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 55 | 56 | -- 57 | -- Dumping data for table `brands` 58 | -- 59 | 60 | INSERT INTO `brands` (`brand_id`, `brand_title`) VALUES 61 | (1, 'Canon'), 62 | (2, 'Lenovo'), 63 | (3, 'Nike'), 64 | (4, 'Dell'), 65 | (5, 'Polo'), 66 | (6, 'Hp'), 67 | (7, 'Apple'), 68 | (8, 'Oppo'), 69 | (9, 'Other'), 70 | (10, 'Samsung'), 71 | (13, 'Nokia'); 72 | 73 | -- -------------------------------------------------------- 74 | 75 | -- 76 | -- Table structure for table `card_details` 77 | -- 78 | 79 | CREATE TABLE `card_details` ( 80 | `product_id` int(11) NOT NULL, 81 | `ip_address` varchar(255) NOT NULL, 82 | `quantity` int(100) NOT NULL 83 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 84 | 85 | -- -------------------------------------------------------- 86 | 87 | -- 88 | -- Table structure for table `categories` 89 | -- 90 | 91 | CREATE TABLE `categories` ( 92 | `category_id` int(11) NOT NULL, 93 | `category_title` varchar(100) NOT NULL 94 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 95 | 96 | -- 97 | -- Dumping data for table `categories` 98 | -- 99 | 100 | INSERT INTO `categories` (`category_id`, `category_title`) VALUES 101 | (1, 'Mobiles'), 102 | (2, 'Books'), 103 | (3, 'Food'), 104 | (4, 'Clothes'), 105 | (5, 'HeadPhones'), 106 | (6, 'Electronics'), 107 | (7, 'Accessories'); 108 | 109 | -- -------------------------------------------------------- 110 | 111 | -- 112 | -- Table structure for table `orders_pending` 113 | -- 114 | 115 | CREATE TABLE `orders_pending` ( 116 | `order_id` int(11) NOT NULL, 117 | `user_id` int(11) NOT NULL, 118 | `invoice_number` int(255) NOT NULL, 119 | `product_id` int(11) NOT NULL, 120 | `quantity` int(255) NOT NULL, 121 | `order_status` varchar(255) NOT NULL 122 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 123 | 124 | -- 125 | -- Dumping data for table `orders_pending` 126 | -- 127 | 128 | INSERT INTO `orders_pending` (`order_id`, `user_id`, `invoice_number`, `product_id`, `quantity`, `order_status`) VALUES 129 | (1, 1, 312346784, 1, 3, 'pending'), 130 | (2, 1, 312346784, 2, 1, 'pending'), 131 | (3, 1, 312346784, 4, 1, 'pending'), 132 | (4, 1, 1918753782, 3, 2, 'pending'), 133 | (5, 1, 351837813, 1, 2, 'pending'); 134 | 135 | -- -------------------------------------------------------- 136 | 137 | -- 138 | -- Table structure for table `products` 139 | -- 140 | 141 | CREATE TABLE `products` ( 142 | `product_id` int(11) NOT NULL, 143 | `product_title` varchar(120) NOT NULL, 144 | `product_description` varchar(255) NOT NULL, 145 | `product_keywords` varchar(255) NOT NULL, 146 | `category_id` int(11) NOT NULL, 147 | `brand_id` int(11) NOT NULL, 148 | `product_image_one` varchar(255) NOT NULL, 149 | `product_image_two` varchar(255) NOT NULL, 150 | `product_image_three` varchar(255) NOT NULL, 151 | `product_price` float NOT NULL, 152 | `date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), 153 | `status` varchar(100) NOT NULL 154 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 155 | 156 | -- 157 | -- Dumping data for table `products` 158 | -- 159 | 160 | INSERT INTO `products` (`product_id`, `product_title`, `product_description`, `product_keywords`, `category_id`, `brand_id`, `product_image_one`, `product_image_two`, `product_image_three`, `product_price`, `date`, `status`) VALUES 161 | (1, 'HAVIT HV-G92 Gamepad', 'allows you to use the familiar layout and buttons to enjoy console control when playing games on your PC The Havit HV-G92 also has multiple game profiles for pressure and controller settings', 'gamepad , havit , hv-g92 , logistech', 6, 9, 'havit1.png', 'havit2.png', 'havit1.png', 120, '2023-08-29 18:05:15', 'true'), 162 | (2, 'ASUS FHD Gaming Laptop', 'Laptop ASUS TUF Gaming F15 FX506HF-HN001W(11th Intel® Core™ i5 11400H - Ram 8GB - Hard 512 GB SSD - GPU Nvidia Geforce RTX™ 2050 4GB - Display 15.6 4k', 'Laptop , gaming , asus , intell 11', 6, 2, 'lap1.png', 'lap2.png', 'lap3.png', 700, '2023-10-25 02:06:58', 'true'), 163 | (3, 'CANON EOS DSLR Camera', 'High Image Quality with 32.5 Megapixel CMOS (APS-C) Sensor DIGIC 8 Image Processor. High-Speed Continuous Shooting of up to 10 fps with no Time Lag during OVF Shooting. 4K (UHD) 30fps / FHD 120fps Video', 'Canon, camera , high quality, 4k', 6, 1, 'camera1.png', 'camera2.png', 'camera3.png', 380, '2023-08-29 18:13:22', 'true'), 164 | (4, 'Breed Dry Dog Food', 'Chicken, chicken by-product meal, corn, wheat, chicken fat, ground grain sorghum, natural flavors, dried plain beet pulp, egg product, potassium chloride, sodium hexametaphosphate, salt, cat food, dog food', 'food, dog food, cat food', 3, 9, 'food1.png', 'food2.png', 'food3.png', 100, '2023-10-25 01:41:31', 'true'); 165 | 166 | -- -------------------------------------------------------- 167 | 168 | -- 169 | -- Table structure for table `user_orders` 170 | -- 171 | 172 | CREATE TABLE `user_orders` ( 173 | `order_id` int(11) NOT NULL, 174 | `user_id` int(11) NOT NULL, 175 | `amount_due` int(255) NOT NULL, 176 | `invoice_number` int(255) NOT NULL, 177 | `total_products` int(255) NOT NULL, 178 | `order_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), 179 | `order_status` varchar(255) NOT NULL 180 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 181 | 182 | -- 183 | -- Dumping data for table `user_orders` 184 | -- 185 | 186 | INSERT INTO `user_orders` (`order_id`, `user_id`, `amount_due`, `invoice_number`, `total_products`, `order_date`, `order_status`) VALUES 187 | (1, 1, 1160, 312346784, 3, '2023-10-22 15:31:20', 'paid'), 188 | (2, 1, 760, 1918753782, 1, '2023-10-24 00:25:10', 'pending'), 189 | (3, 1, 240, 351837813, 1, '2023-10-24 18:41:02', 'pending'); 190 | 191 | -- -------------------------------------------------------- 192 | 193 | -- 194 | -- Table structure for table `user_payments` 195 | -- 196 | 197 | CREATE TABLE `user_payments` ( 198 | `payment_id` int(11) NOT NULL, 199 | `order_id` int(11) NOT NULL, 200 | `invoice_number` int(11) NOT NULL, 201 | `amount` int(11) NOT NULL, 202 | `payment_method` varchar(255) NOT NULL, 203 | `payment_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() 204 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 205 | 206 | -- 207 | -- Dumping data for table `user_payments` 208 | -- 209 | 210 | INSERT INTO `user_payments` (`payment_id`, `order_id`, `invoice_number`, `amount`, `payment_method`, `payment_date`) VALUES 211 | (1, 1, 312346784, 1160, 'paypal', '2023-10-24 00:23:26'); 212 | 213 | -- -------------------------------------------------------- 214 | 215 | -- 216 | -- Table structure for table `user_table` 217 | -- 218 | 219 | CREATE TABLE `user_table` ( 220 | `user_id` int(11) NOT NULL, 221 | `username` varchar(100) NOT NULL, 222 | `user_email` varchar(100) NOT NULL, 223 | `user_password` varchar(255) NOT NULL, 224 | `user_image` varchar(255) NOT NULL, 225 | `user_ip` varchar(100) NOT NULL, 226 | `user_address` varchar(255) NOT NULL, 227 | `user_mobile` varchar(20) NOT NULL 228 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; 229 | 230 | -- 231 | -- Dumping data for table `user_table` 232 | -- 233 | 234 | INSERT INTO `user_table` (`user_id`, `username`, `user_email`, `user_password`, `user_image`, `user_ip`, `user_address`, `user_mobile`) VALUES 235 | (1, 'abdo', 'abdo@gmail.com', '$2y$10$5ynby9fq7wf2ZmHlkvehu.JGbK6r7zZLtLzuJz9Jt5FP03rGZ9Mj.', 'new logo after Edit1920.png', '::1', 'Cairo', '123456789'); 236 | 237 | -- 238 | -- Indexes for dumped tables 239 | -- 240 | 241 | -- 242 | -- Indexes for table `admin_table` 243 | -- 244 | ALTER TABLE `admin_table` 245 | ADD PRIMARY KEY (`admin_id`); 246 | 247 | -- 248 | -- Indexes for table `brands` 249 | -- 250 | ALTER TABLE `brands` 251 | ADD PRIMARY KEY (`brand_id`); 252 | 253 | -- 254 | -- Indexes for table `card_details` 255 | -- 256 | ALTER TABLE `card_details` 257 | ADD PRIMARY KEY (`product_id`); 258 | 259 | -- 260 | -- Indexes for table `categories` 261 | -- 262 | ALTER TABLE `categories` 263 | ADD PRIMARY KEY (`category_id`); 264 | 265 | -- 266 | -- Indexes for table `orders_pending` 267 | -- 268 | ALTER TABLE `orders_pending` 269 | ADD PRIMARY KEY (`order_id`); 270 | 271 | -- 272 | -- Indexes for table `products` 273 | -- 274 | ALTER TABLE `products` 275 | ADD PRIMARY KEY (`product_id`); 276 | 277 | -- 278 | -- Indexes for table `user_orders` 279 | -- 280 | ALTER TABLE `user_orders` 281 | ADD PRIMARY KEY (`order_id`); 282 | 283 | -- 284 | -- Indexes for table `user_payments` 285 | -- 286 | ALTER TABLE `user_payments` 287 | ADD PRIMARY KEY (`payment_id`); 288 | 289 | -- 290 | -- Indexes for table `user_table` 291 | -- 292 | ALTER TABLE `user_table` 293 | ADD PRIMARY KEY (`user_id`); 294 | 295 | -- 296 | -- AUTO_INCREMENT for dumped tables 297 | -- 298 | 299 | -- 300 | -- AUTO_INCREMENT for table `admin_table` 301 | -- 302 | ALTER TABLE `admin_table` 303 | MODIFY `admin_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; 304 | 305 | -- 306 | -- AUTO_INCREMENT for table `brands` 307 | -- 308 | ALTER TABLE `brands` 309 | MODIFY `brand_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; 310 | 311 | -- 312 | -- AUTO_INCREMENT for table `categories` 313 | -- 314 | ALTER TABLE `categories` 315 | MODIFY `category_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; 316 | 317 | -- 318 | -- AUTO_INCREMENT for table `orders_pending` 319 | -- 320 | ALTER TABLE `orders_pending` 321 | MODIFY `order_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; 322 | 323 | -- 324 | -- AUTO_INCREMENT for table `products` 325 | -- 326 | ALTER TABLE `products` 327 | MODIFY `product_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; 328 | 329 | -- 330 | -- AUTO_INCREMENT for table `user_orders` 331 | -- 332 | ALTER TABLE `user_orders` 333 | MODIFY `order_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; 334 | 335 | -- 336 | -- AUTO_INCREMENT for table `user_payments` 337 | -- 338 | ALTER TABLE `user_payments` 339 | MODIFY `payment_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; 340 | 341 | -- 342 | -- AUTO_INCREMENT for table `user_table` 343 | -- 344 | ALTER TABLE `user_table` 345 | MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; 346 | COMMIT; 347 | 348 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 349 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 350 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 351 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # E-Commerce-PHP-MySQL- 2 |

View

3 |

View

4 |

View

5 |

View

6 |

View

7 |

View

8 |

View

9 |

View

10 |

View

11 |

View

12 |

View

13 |

View

14 |

View

15 | -------------------------------------------------------------------------------- /admin/admin_images/logo after 3d_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/admin_images/logo after 3d_2.png -------------------------------------------------------------------------------- /admin/admin_login.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce Admin Login 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 |

Admin Login

23 |

Login to your account

24 |
25 |
26 | Login photo 27 |
28 |
29 |
30 |
31 |
32 | 33 | 34 |
35 |
36 | 37 | 38 |
39 | 42 |
43 | 44 |

45 | Don't have an account? Register 46 |

47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 0) { 80 | if (password_verify($password, $row_data['admin_password'])) { 81 | $_SESSION['admin_username'] = $username; 82 | echo ""; 83 | echo ""; 84 | } else { 85 | echo ""; 86 | } 87 | } else { 88 | echo ""; 89 | } 90 | } 91 | ?> -------------------------------------------------------------------------------- /admin/admin_logout.php: -------------------------------------------------------------------------------- 1 | window.open('./admin_login.php','_self');"; 6 | ?> -------------------------------------------------------------------------------- /admin/admin_resgistration.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce Admin Registration 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 |

Admin Registration

23 |

Create an account

24 |
25 |
26 | Register photo 27 |
28 |
29 |
30 |
31 |
32 | 33 | 34 |
35 |
36 | 37 | 38 |
39 |
40 | 41 | 42 |
43 |
44 | 45 | 46 |
47 |
48 | 49 | 50 |
51 |
52 | 53 |

54 | You already have an account? Login 55 |

56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 0) { 94 | echo ""; 95 | } else if ($password != $conf_password) { 96 | echo ""; 97 | } else { 98 | // insert query 99 | move_uploaded_file($image_tmp, "./admin_images/$image"); 100 | $insert_query = "INSERT INTO `admin_table` (admin_name,admin_email,admin_image,admin_password) VALUES ('$username','$email','$image','$hash_password')"; 101 | $insert_result = mysqli_query($con, $insert_query); 102 | if ($insert_result) { 103 | echo ""; 104 | } else { 105 | die(mysqli_error($con)); 106 | } 107 | } 108 | } 109 | ?> -------------------------------------------------------------------------------- /admin/delete_brand.php: -------------------------------------------------------------------------------- 1 | window.alert('Brand deleted successfully');"; 8 | echo ""; 9 | } 10 | } 11 | ?> -------------------------------------------------------------------------------- /admin/delete_category.php: -------------------------------------------------------------------------------- 1 | window.alert('Category deleted successfully');"; 8 | echo ""; 9 | } 10 | } 11 | ?> -------------------------------------------------------------------------------- /admin/delete_order.php: -------------------------------------------------------------------------------- 1 | fetch invoice number from user_orders, then delete from orders pending using invoice_number] 8 | // $get_invoice_query = "SELECT * FROM `user_orders` WHERE order_id = $delete_id"; 9 | // $get_invoice_result = mysqli_query($con,$get_invoice_query); 10 | // $row_fetch_invoice = mysqli_fetch_array($get_invoice_result); 11 | // $invoice_to_delete = $row_fetch_invoice['invoice_number']; 12 | // $delete_orders_pending_query = "DELETE FROM `orders_pending` WHERE invoice_number = '$invoice_to_delete'"; 13 | // $delete_orders_pending_result = mysqli_query($con,$delete_orders_pending_query); 14 | if($delete_result){ 15 | echo ""; 16 | echo ""; 17 | } 18 | 19 | } 20 | ?> -------------------------------------------------------------------------------- /admin/delete_payment.php: -------------------------------------------------------------------------------- 1 | window.alert('Payment deleted successfully');"; 9 | echo ""; 10 | } 11 | 12 | } 13 | ?> -------------------------------------------------------------------------------- /admin/delete_product.php: -------------------------------------------------------------------------------- 1 | window.alert('Product deleted successfully');"; 8 | echo ""; 9 | } 10 | } 11 | ?> -------------------------------------------------------------------------------- /admin/edit_brand.php: -------------------------------------------------------------------------------- 1 | window.alert('Please fill the field');"; 17 | }else{ 18 | // update query 19 | $update_brand_query = "UPDATE `brands` SET brand_title='$brand_title' WHERE brand_id = $edit_id"; 20 | $update_brand_result = mysqli_query($con,$update_brand_query); 21 | if($update_brand_result){ 22 | echo ""; 23 | echo ""; 24 | } 25 | } 26 | } 27 | ?> 28 |
29 |
30 |
31 |

Edit Brand

32 |
33 |
34 | 35 | 36 |
37 |
38 | 39 |
40 |
41 |
42 |
43 |
-------------------------------------------------------------------------------- /admin/edit_category.php: -------------------------------------------------------------------------------- 1 | window.alert('Please fill the field');"; 17 | }else{ 18 | // update query 19 | $update_category_query = "UPDATE `categories` SET category_title='$category_title' WHERE category_id = $edit_id"; 20 | $update_category_result = mysqli_query($con,$update_category_query); 21 | if($update_category_result){ 22 | echo ""; 23 | echo ""; 24 | } 25 | } 26 | } 27 | ?> 28 |
29 |
30 |
31 |

Edit Category

32 |
33 |
34 | 35 | 36 |
37 |
38 | 39 |
40 |
41 |
42 |
43 |
-------------------------------------------------------------------------------- /admin/edit_product.php: -------------------------------------------------------------------------------- 1 | window.alert('Please fill all fields');"; 37 | }else{ 38 | move_uploaded_file($product_image_one_tmp,"./product_images/$product_image_one"); 39 | move_uploaded_file($product_image_two_tmp,"./product_images/$product_image_two"); 40 | move_uploaded_file($product_image_three_tmp,"./product_images/$product_image_three"); 41 | // update query 42 | $update_product_query = "UPDATE `products` SET category_id=$product_category_id,brand_id=$product_brand_id,product_title='$product_title',product_description='$product_description',product_keywords='$product_keywords',product_image_one='$product_image_one',product_image_two='$product_image_two',product_image_three='$product_image_three',product_price='$product_price',date=NOW() WHERE product_id = $edit_id"; 43 | $update_product_result = mysqli_query($con,$update_product_query); 44 | if($update_product_result){ 45 | echo ""; 46 | echo ""; 47 | } 48 | } 49 | } 50 | ?> 51 |
52 |
53 |
54 |

Edit Product

55 |
56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 |
64 |
65 | 66 | 67 |
68 |
69 | 70 | 86 |
87 |
88 | 89 | 105 |
106 |
107 | 108 |
109 | 110 | <?php echo $product_title;?> 111 |
112 |
113 |
114 | 115 |
116 | 117 | <?php echo $product_title;?> 118 |
119 |
120 |
121 | 122 |
123 | 124 | <?php echo $product_title;?> 125 |
126 |
127 |
128 | 129 | 130 |
131 |
132 | 133 |
134 |
135 |
136 |
137 |
-------------------------------------------------------------------------------- /admin/index.php: -------------------------------------------------------------------------------- 1 | window.open('./admin_login.php','_self');"; 14 | } 15 | ?> 16 | 17 | 18 | 19 | 20 | 21 | 22 | Ecommerce Admin Dashboard 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | Admin Dashboard And Free Express Delivery 31 |
32 | 33 | 34 | 55 | 56 | 57 |
58 |
59 |
60 |
61 | 62 | Admin Dashboard 63 |
64 |

Manage Details Of Ecommerce

65 |
66 |
67 |
68 |
69 | Admin Photo 70 |

71 |
72 |
73 |
74 |
75 | 78 | 81 | 84 | 87 | 90 | 93 | 96 | 99 | 102 |
103 |
104 |
105 |
106 |
107 | 108 | 109 |
110 |
111 |
112 | 113 | 114 |
115 |
116 | 167 |
168 |
169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 181 | 182 | 183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /admin/insert_brands.php: -------------------------------------------------------------------------------- 1 | 0){ 9 | echo ""; 10 | }else{ 11 | $insert_query="INSERT INTO `brands` (brand_title) VALUES ('$brand_title')"; 12 | $insert_result=mysqli_query($con,$insert_query); 13 | if ($insert_result){ 14 | echo ""; 15 | } 16 | 17 | } 18 | } 19 | ?> 20 |
21 |
22 | 23 |

Insert Brands

24 |
25 |
26 |
27 |
28 | 29 | 30 | 31 | 32 |
33 |
34 | 35 |
36 |
-------------------------------------------------------------------------------- /admin/insert_categories.php: -------------------------------------------------------------------------------- 1 | 0) { 9 | echo ""; 10 | } else { 11 | 12 | $insert_query = "INSERT INTO `categories` (category_title) VALUES ('$category_title')"; 13 | $insert_result = mysqli_query($con, $insert_query); 14 | if ($insert_result){ 15 | echo ""; 16 | } 17 | } 18 | } 19 | ?> 20 | 21 |
22 |
23 | 24 |

Insert Categories

25 |
26 |
27 |
28 |
29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 |
37 | 38 |
39 |
-------------------------------------------------------------------------------- /admin/insert_product.php: -------------------------------------------------------------------------------- 1 | alert(\"Fields should not be empty\");"; 22 | exit(); 23 | }else{ 24 | //move folders 25 | move_uploaded_file($temp_image_one,"./product_images/$product_image_one"); 26 | move_uploaded_file($temp_image_two,"./product_images/$product_image_two"); 27 | move_uploaded_file($temp_image_three,"./product_images/$product_image_three"); 28 | //insert query in db 29 | $insert_query = "INSERT INTO `products` (product_title,product_description,product_keywords,category_id,brand_id,product_image_one,product_image_two,product_image_three,product_price,date,status) VALUES ('$product_title','$product_description','$product_keywords','$product_category','$product_brand','$product_image_one','$product_image_two','$product_image_three','$product_price',NOW(),'$product_status')"; 30 | $insert_result=mysqli_query($con,$insert_query); 31 | if($insert_result){ 32 | echo ""; 33 | } 34 | } 35 | } 36 | ?> 37 | 38 | 39 | 40 | 41 | 42 | 43 | Insert Products - Admin Dashboard 44 | 45 | 46 | 47 | 48 | 49 |
50 |
51 | 55 |

Insert Products

56 |
57 |
58 |
59 |
60 | 61 |
62 | 63 | 64 |
65 | 66 |
67 | 68 | 69 |
70 | 71 |
72 | 73 | 74 |
75 | 76 |
77 | 91 |
92 | 93 |
94 | 108 |
109 | 110 |
111 | 112 | 113 |
114 | 115 |
116 | 117 | 118 |
119 | 120 |
121 | 122 | 123 |
124 | 125 |
126 | 127 | 128 |
129 | 130 |
131 | 132 |
133 |
134 |
135 |
136 |
137 | 138 | 139 | -------------------------------------------------------------------------------- /admin/list_orders.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | View Orders Page 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 |

All Orders

16 |
17 |
18 |
19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | "; 38 | } 39 | ?> 40 | 41 | 42 | No orders yet"; 49 | } else { 50 | $id_number = 1; 51 | while ($row_fetch_orders = mysqli_fetch_array($get_order_result)) { 52 | $order_id = $row_fetch_orders['order_id']; 53 | $amount_due = $row_fetch_orders['amount_due']; 54 | $invoice_number = $row_fetch_orders['invoice_number']; 55 | $total_products = $row_fetch_orders['total_products']; 56 | $order_date = $row_fetch_orders['order_date']; 57 | $order_status = $row_fetch_orders['order_status']; 58 | $order_complete = $row_fetch_orders['order_status'] == 'paid'? 'Complete' : 'Incomplete'; 59 | echo " 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 103 | 104 | "; 105 | 106 | $id_number++; 107 | } 108 | } 109 | ?> 110 | 111 |
Order No.Due AmountInvoice NumberTotal ProductsOrder DateStatusComplete/IncompleteDelete
$id_number$amount_due$invoice_number$total_products$order_date$order_status$order_complete 69 | 70 | 71 | 72 | 73 | 101 | 102 |
112 |
113 |
114 | 115 | 116 | -------------------------------------------------------------------------------- /admin/list_payments.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | View Payments Page 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 |

All Payments

16 |
17 |
18 |
19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | "; 37 | } 38 | ?> 39 | 40 | 41 | No payments yet"; 48 | } else { 49 | $id_number = 1; 50 | while ($row_fetch_payments = mysqli_fetch_array($get_payment_result)) { 51 | $payment_id = $row_fetch_payments['payment_id']; 52 | $order_id = $row_fetch_payments['order_id']; 53 | $invoice_number = $row_fetch_payments['invoice_number']; 54 | $amount_due = $row_fetch_payments['amount']; 55 | $payment_method = $row_fetch_payments['payment_method']; 56 | $payment_date = $row_fetch_payments['payment_date']; 57 | echo " 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 100 | 101 | "; 102 | 103 | $id_number++; 104 | } 105 | } 106 | ?> 107 | 108 |
Payment No.Order IdInvoice NumberDue AmountPayment MethodPayment DateDelete
$id_number$order_id$invoice_number$amount_due$payment_method$payment_date 66 | 67 | 68 | 69 | 70 | 98 | 99 |
109 |
110 |
111 | 112 | 113 | -------------------------------------------------------------------------------- /admin/list_users.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | View Users Page 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 |

All Users

16 |
17 |
18 |
19 | 20 | 21 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | "; 37 | } 38 | ?> 39 | 40 | 41 | No users yet"; 48 | } else { 49 | $id_number = 1; 50 | while ($row_fetch_users = mysqli_fetch_array($get_user_result)) { 51 | $user_id = $row_fetch_users['user_id']; 52 | $username = $row_fetch_users['username']; 53 | $user_email = $row_fetch_users['user_email']; 54 | $user_image = $row_fetch_users['user_image']; 55 | $user_address = $row_fetch_users['user_address']; 56 | $user_mobile = $row_fetch_users['user_mobile']; 57 | echo " 58 | 59 | 60 | 61 | 62 | 65 | 66 | 67 | 102 | 103 | "; 104 | 105 | $id_number++; 106 | } 107 | } 108 | ?> 109 | 110 |
User No.UsernameEmailImageAddressMobileDelete
$id_number$username$user_email 63 | $username photo 64 | $user_address$user_mobile 68 | 69 | 70 | 71 | 72 | 100 | 101 |
111 |
112 |
113 | 114 | 115 | -------------------------------------------------------------------------------- /admin/product_images/camera1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/camera1.png -------------------------------------------------------------------------------- /admin/product_images/camera2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/camera2.png -------------------------------------------------------------------------------- /admin/product_images/camera3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/camera3.png -------------------------------------------------------------------------------- /admin/product_images/food1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/food1.png -------------------------------------------------------------------------------- /admin/product_images/food2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/food2.png -------------------------------------------------------------------------------- /admin/product_images/food3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/food3.png -------------------------------------------------------------------------------- /admin/product_images/havit1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/havit1.png -------------------------------------------------------------------------------- /admin/product_images/havit2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/havit2.png -------------------------------------------------------------------------------- /admin/product_images/lap1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/lap1.png -------------------------------------------------------------------------------- /admin/product_images/lap2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/lap2.png -------------------------------------------------------------------------------- /admin/product_images/lap3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/admin/product_images/lap3.png -------------------------------------------------------------------------------- /admin/view_brands.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | View Brands Page 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 |

All Brands

16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 40 | 41 | 46 | 81 | 82 | "; 83 | 84 | $id_number++; 85 | } 86 | ?> 87 | 88 |
Brands No.Brands TitleEditDelete
$id_number$brand_title 42 | 43 | 44 | 45 | 47 | 48 | 49 | 50 | 51 | 79 | 80 |
89 | 90 | 91 |
92 |
93 | 94 | 95 | -------------------------------------------------------------------------------- /admin/view_categories.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | View Categories Page 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 |

All Categories

16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 39 | 40 | 41 | 46 | 81 | 82 | "; 83 | 84 | $id_number++; 85 | } 86 | ?> 87 | 88 |
Categories No.Categories TitleEditDelete
$id_number$category_title 42 | 43 | 44 | 45 | 47 | 48 | 49 | 50 | 51 | 79 | 80 |
89 |
90 |
91 | 92 | 93 | -------------------------------------------------------------------------------- /admin/view_products.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | View Product Page 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 |

All Products

16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 55 | 56 | 57 | 60 | 61 | 62 | 63 | 68 | 103 | 104 | "; 105 | 106 | $id_number++; 107 | } 108 | ?> 109 | 110 |
Product IDProduct TitleProduct ImageProduct PriceTotal SoldStatusEditDelete
$id_number$product_title 58 | $product_title 59 | $product_price $$quantity_sold_of_each_product$product_status 64 | 65 | 66 | 67 | 69 | 70 | 71 | 72 | 73 | 101 | 102 |
111 |
112 |
113 | 114 | 115 | -------------------------------------------------------------------------------- /assets/css/main.css: -------------------------------------------------------------------------------- 1 | /* Global Fonts */ 2 | /* @font-face { 3 | font-family: "light"; 4 | src: url("../fonts/Roboto-Light.ttf"); 5 | } */ 6 | /* Global Fonts */ 7 | /* Global Rules */ 8 | * { 9 | -webkit-box-sizing: border-box; 10 | -moz-box-sizing: border-box; 11 | box-sizing: border-box; 12 | margin: 0; 13 | padding: 0; 14 | } 15 | 16 | html { 17 | scroll-behavior: smooth; 18 | } 19 | 20 | body { 21 | /* font-family: "regular","sans-serif"; */ 22 | } 23 | 24 | a { 25 | text-decoration: none; 26 | color: #000000; 27 | cursor: pointer; 28 | } 29 | button, 30 | input[type="submit"] { 31 | cursor: pointer; 32 | } 33 | 34 | ul { 35 | list-style: none; 36 | } 37 | 38 | .primary-bg { 39 | background-color: #000; 40 | } 41 | 42 | .primary-1 { 43 | background-color: #ffffff; 44 | } 45 | 46 | .primary-2 { 47 | background-color: #363738; 48 | } 49 | 50 | .secondry-1 { 51 | background-color: #DB4444; 52 | } 53 | 54 | .text-1 { 55 | color: #7D8184; 56 | } 57 | .text-2 { 58 | color: #DB4444; 59 | } 60 | .text-3 { 61 | color: #212529 !important; 62 | } 63 | .text-dark { 64 | --bs-text-opacity: 1; 65 | color: rgba(var(--bs-darkk-rgb), var(--bs-text-opacity)) !important; 66 | } 67 | 68 | .divider { 69 | background-color: #eaeaea; 70 | height: 1.5px; 71 | width: 100%; 72 | margin-top: 30px; 73 | margin-bottom: 40px; 74 | } 75 | 76 | .container .categ-header { 77 | display: flex; 78 | flex-direction: column; 79 | gap: 20px; 80 | margin-bottom: 40px; 81 | } 82 | 83 | .container .categ-header .sub-title { 84 | display: flex; 85 | flex-direction: row; 86 | gap: 18px; 87 | align-items: center; 88 | } 89 | 90 | .container .categ-header .sub-title span:nth-of-type(1) { 91 | width: 18px; 92 | height: 35px; 93 | background-color: #DB4444; 94 | border-radius: 4px; 95 | -webkit-border-radius: 4px; 96 | -moz-border-radius: 4px; 97 | -ms-border-radius: 4px; 98 | -o-border-radius: 4px; 99 | } 100 | .shape { 101 | display: inline-block; 102 | width: 18px; 103 | height: 35px; 104 | background-color: #DB4444; 105 | border-radius: 4px; 106 | -webkit-border-radius: 4px; 107 | -moz-border-radius: 4px; 108 | -ms-border-radius: 4px; 109 | -o-border-radius: 4px; 110 | } 111 | 112 | .container .categ-header .sub-title span:nth-of-type(2) { 113 | color: #DB4444; 114 | font-weight: bold; 115 | } 116 | 117 | /* ---> Global for one card */ 118 | .one-card { 119 | display: flex; 120 | flex-direction: column; 121 | gap: 18px; 122 | } 123 | 124 | .one-card .photo { 125 | background-color: #eaeaea; 126 | padding: 20px; 127 | display: flex; 128 | justify-content: center; 129 | align-items: center; 130 | position: relative; 131 | overflow: hidden; 132 | height: 320px; 133 | border-radius: 4px; 134 | -webkit-border-radius: 4px; 135 | -moz-border-radius: 4px; 136 | -ms-border-radius: 4px; 137 | -o-border-radius: 4px; 138 | } 139 | 140 | .one-card .photo img { 141 | width: 50%; 142 | } 143 | 144 | .one-card .photo button { 145 | position: absolute; 146 | width: 50%; 147 | background-color: #000000; 148 | color: #ffffff; 149 | border: none; 150 | padding: 6px; 151 | bottom: -40px; 152 | transition: all 0.2s ease-in-out; 153 | -webkit-transition: all 0.2s ease-in-out; 154 | -moz-transition: all 0.2s ease-in-out; 155 | -ms-transition: all 0.2s ease-in-out; 156 | -o-transition: all 0.2s ease-in-out; 157 | } 158 | 159 | .one-card .photo button:nth-child(2) { 160 | border-radius: 0px 0px 0px 4px; 161 | left: 0; 162 | -webkit-border-radius: 0px 0px 0px 4px; 163 | -moz-border-radius: 0px 0px 0px 4px; 164 | -ms-border-radius: 0px 0px 0px 4px; 165 | -o-border-radius: 0px 0px 0px 4px; 166 | } 167 | .one-card .photo button:nth-child(3) { 168 | background-color: #DB4444; 169 | border-radius: 0px 0px 4px 0px; 170 | right: 0; 171 | -webkit-border-radius: 0px 0px 4px 0px; 172 | -moz-border-radius: 0px 0px 4px 0px; 173 | -ms-border-radius: 0px 0px 4px 0px; 174 | -o-border-radius: 0px 0px 4px 0px; 175 | } 176 | .one-card .photo:hover button { 177 | bottom: 0px; 178 | } 179 | 180 | .one-card .content .desc { 181 | display: flex; 182 | gap: 8px; 183 | align-items: center; 184 | } 185 | 186 | @media (max-width:767px) { 187 | .one-card .content { 188 | text-align: center; 189 | } 190 | 191 | .one-card .content .desc { 192 | justify-content: center; 193 | } 194 | } 195 | 196 | .one-card .content .desc span:nth-of-type(1) { 197 | color: #DB4444; 198 | } 199 | 200 | .one-card .content .desc span:nth-of-type(2) { 201 | display: flex; 202 | gap: 3px; 203 | } 204 | 205 | .one-card .content .desc span:nth-of-type(3) { 206 | color: #717171; 207 | } 208 | 209 | /* Global Rules */ 210 | /* Start Upper Nav */ 211 | .upper-nav span { 212 | color: #ffffff; 213 | font-size: 14px; 214 | } 215 | 216 | .upper-nav span a { 217 | text-decoration: underline !important; 218 | } 219 | 220 | /* End Upper Nav */ 221 | /* Start NavBar */ 222 | .bg-light { 223 | background-color: #ffffff !important; 224 | border-bottom: 1px solid #7D8184; 225 | } 226 | 227 | .navbar .d-flex .form-control { 228 | background-color: #F5F5F5; 229 | border: none; 230 | } 231 | 232 | .navbar .d-flex .btn-outline-primary { 233 | background-color: #DB4444; 234 | color: #ffffff; 235 | border: none; 236 | } 237 | 238 | /* End NavBar */ 239 | /* ******************* 240 | **** Index.php **** 241 | ******************* 242 | */ 243 | /* Start Landing Section */ 244 | .landing .container .row .cover { 245 | background-image: url("../images/bg.png"); 246 | background-size: cover; 247 | height: 100%; 248 | display: flex; 249 | flex-direction: column; 250 | gap: 18px; 251 | align-items: flex-start; 252 | padding: 40px; 253 | color: white; 254 | } 255 | 256 | .landing .container .row .cover .desc { 257 | font-size: 40px; 258 | } 259 | 260 | .landing .container .row .cover a { 261 | color: #ffffff; 262 | text-decoration: underline; 263 | } 264 | 265 | .landing .container .row .tabs-categ ul { 266 | border-right: 1px solid #7D8184; 267 | width: 80%; 268 | } 269 | 270 | @media (max-width:767px) { 271 | .landing .container .row .tabs-categ ul { 272 | border-right: none; 273 | width: 100%; 274 | text-align: left; 275 | padding-top: 25px; 276 | } 277 | 278 | } 279 | .landing img.img-thumbnail{ 280 | /* width: 50px; */ 281 | height: 80px; 282 | object-fit: contain; 283 | } 284 | /* End Landing Section */ 285 | /* Start Category Section */ 286 | .category { 287 | padding-top: 20px; 288 | padding-bottom: 40px; 289 | } 290 | 291 | .category .container .categ-header { 292 | display: flex; 293 | flex-direction: column; 294 | gap: 20px; 295 | margin-bottom: 40px; 296 | } 297 | 298 | .category .container .categ-header .sub-title { 299 | display: flex; 300 | flex-direction: row; 301 | gap: 18px; 302 | align-items: center; 303 | } 304 | 305 | .category .container .categ-header .sub-title span:nth-of-type(1) { 306 | width: 18px; 307 | height: 35px; 308 | background-color: #DB4444; 309 | border-radius: 4px; 310 | -webkit-border-radius: 4px; 311 | -moz-border-radius: 4px; 312 | -ms-border-radius: 4px; 313 | -o-border-radius: 4px; 314 | } 315 | 316 | .category .container .categ-header .sub-title span:nth-of-type(2) { 317 | color: #DB4444; 318 | font-weight: bold; 319 | } 320 | 321 | .category .container .cards { 322 | display: grid; 323 | grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 324 | grid-gap: 8px; 325 | } 326 | 327 | .category .container .cards .card { 328 | padding: 28px; 329 | display: flex; 330 | flex-direction: column; 331 | gap: 8px; 332 | justify-content: center; 333 | align-items: center; 334 | transition: all 0.1s ease-in-out; 335 | -webkit-transition: all 0.1s ease-in-out; 336 | -moz-transition: all 0.1s ease-in-out; 337 | -ms-transition: all 0.1s ease-in-out; 338 | -o-transition: all 0.1s ease-in-out; 339 | } 340 | 341 | .category .container .cards .card:hover { 342 | background-color: #DB4444; 343 | color: #ffffff; 344 | } 345 | 346 | .category .container .cards .card:hover path, 347 | .category .container .cards .card:hover line { 348 | stroke: #ffffff; 349 | } 350 | 351 | /* End Category Section */ 352 | /* Start Advertise Section */ 353 | .adver { 354 | padding-top: 20px; 355 | padding-bottom: 40px; 356 | margin-bottom: 20px; 357 | } 358 | 359 | .adver .container .cover { 360 | background-image: url("../images/bgsecond.png"); 361 | background-position: center; 362 | background-size: cover; 363 | height: 60vh; 364 | display: flex; 365 | flex-direction: column; 366 | gap: 25px; 367 | align-items: flex-start; 368 | justify-content: center; 369 | color: white; 370 | padding: 70px; 371 | } 372 | 373 | .adver .container .cover .title { 374 | color: #00FF66; 375 | font-weight: bold; 376 | } 377 | 378 | .adver .container .cover .desc { 379 | font-size: 50px; 380 | } 381 | 382 | @media (max-width:767px) { 383 | .adver .container .cover .desc { 384 | font-size: 20px; 385 | } 386 | } 387 | 388 | .adver .container .cover button { 389 | background-color: #00FF66; 390 | color: #ffffff; 391 | padding: 8px 25px; 392 | border: none; 393 | border-radius: 4px; 394 | -webkit-border-radius: 4px; 395 | -moz-border-radius: 4px; 396 | -ms-border-radius: 4px; 397 | -o-border-radius: 4px; 398 | } 399 | 400 | /* End Advertise Section */ 401 | /* Start Products Section */ 402 | .products { 403 | padding-top: 20px; 404 | padding-bottom: 40px; 405 | } 406 | 407 | .products .container .cards { 408 | display: grid; 409 | grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 410 | gap: 20px; 411 | margin-bottom: 45px; 412 | } 413 | 414 | .products .container .cards .one-card { 415 | display: flex; 416 | flex-direction: column; 417 | gap: 18px; 418 | } 419 | 420 | .products .container .cards .one-card .photo { 421 | background-color: #eaeaea; 422 | padding: 20px; 423 | display: flex; 424 | justify-content: center; 425 | align-items: center; 426 | position: relative; 427 | overflow: hidden; 428 | height: 320px; 429 | border-radius: 4px; 430 | -webkit-border-radius: 4px; 431 | -moz-border-radius: 4px; 432 | -ms-border-radius: 4px; 433 | -o-border-radius: 4px; 434 | } 435 | 436 | .products .container .cards .one-card .photo img { 437 | width: 50%; 438 | } 439 | 440 | .products .container .cards .one-card .photo button { 441 | position: absolute; 442 | width: 100%; 443 | background-color: #000000; 444 | color: #ffffff; 445 | border: none; 446 | padding: 6px; 447 | bottom: -40px; 448 | transition: all 0.2s ease-in-out; 449 | border-radius: 0px 0px 4px 4px; 450 | -webkit-border-radius: 0px 0px 4px 4px; 451 | -moz-border-radius: 0px 0px 4px 4px; 452 | -ms-border-radius: 0px 0px 4px 4px; 453 | -o-border-radius: 0px 0px 4px 4px; 454 | -webkit-transition: all 0.2s ease-in-out; 455 | -moz-transition: all 0.2s ease-in-out; 456 | -ms-transition: all 0.2s ease-in-out; 457 | -o-transition: all 0.2s ease-in-out; 458 | } 459 | 460 | .products .container .cards .one-card .photo:hover button { 461 | bottom: 0px; 462 | } 463 | 464 | .products .container .cards .one-card .content .desc { 465 | display: flex; 466 | gap: 8px; 467 | align-items: center; 468 | } 469 | 470 | @media (max-width:767px) { 471 | .products .container .cards .one-card .content { 472 | text-align: center; 473 | } 474 | 475 | .products .container .cards .one-card .content .desc { 476 | justify-content: center; 477 | } 478 | } 479 | 480 | .products .container .cards .one-card .content .desc span:nth-of-type(1) { 481 | color: #DB4444; 482 | } 483 | 484 | .products .container .cards .one-card .content .desc span:nth-of-type(2) { 485 | display: flex; 486 | gap: 3px; 487 | } 488 | 489 | .products .container .cards .one-card .content .desc span:nth-of-type(3) { 490 | color: #717171; 491 | } 492 | 493 | .products .container .view button { 494 | padding: 12px 28px; 495 | background-color: #DB4444; 496 | color: #ffffff; 497 | border: none; 498 | border-radius: 4px; 499 | -webkit-border-radius: 4px; 500 | -moz-border-radius: 4px; 501 | -ms-border-radius: 4px; 502 | -o-border-radius: 4px; 503 | } 504 | /* End Products Section */ 505 | /* ********************** 506 | **** products.php **** 507 | ********************** 508 | */ 509 | .all-prod .container .sub-container .side-nav a{ 510 | padding: 8px 10px; 511 | } 512 | /* ************************** 513 | **** /Admin/index.php **** 514 | ************************** 515 | */ 516 | .control .container .row .admin-image{ 517 | width: 80%; 518 | background-color: #F5F5F5; 519 | padding: 20px; 520 | display: flex; 521 | flex-direction: column; 522 | gap:18px; 523 | align-items: center; 524 | border-radius: 8px; 525 | -webkit-border-radius: 8px; 526 | -moz-border-radius: 8px; 527 | -ms-border-radius: 8px; 528 | -o-border-radius: 8px; 529 | } 530 | @media (max-width:767px) { 531 | .control .container .row .admin-image{ 532 | margin: 0px auto; 533 | } 534 | .control .container .row.align-items-center{ 535 | text-align: center; 536 | } 537 | } 538 | .control .container .row .admin-image img{ 539 | width: 100%; 540 | } 541 | .control .container .row .buttons a.nav-link{ 542 | transition: 0s; 543 | -webkit-transition: 0s; 544 | -moz-transition: 0s; 545 | -ms-transition: 0s; 546 | -o-transition: 0s; 547 | } 548 | 549 | /* Start Product Details */ 550 | .prod-details{ 551 | margin-bottom: 50px; 552 | } 553 | .prod-details .prod-imgs{ 554 | display: flex; 555 | flex-direction: column; 556 | gap: 18px; 557 | } 558 | .prod-details .prod-imgs img{ 559 | width: 100%; 560 | } 561 | @media (max-width:767px) { 562 | .prod-details .prod-imgs{ 563 | flex-direction: row; 564 | justify-content: center; 565 | } 566 | .prod-details .prod-imgs img{ 567 | width: 20%; 568 | } 569 | } 570 | .prod-details .main-img { 571 | display: flex; 572 | background-color: #eaeaea; 573 | justify-content: center; 574 | align-items: center; 575 | width: 100%; 576 | height: 100%; 577 | } 578 | .prod-details .main-img img{ 579 | width: 100%; 580 | } 581 | .in-stack{ 582 | color: #00FF66; 583 | } 584 | .out-stack{ 585 | color: #DB4444; 586 | } 587 | .prod-details .buy-item .num-btns .btn-increase, 588 | .prod-details .buy-item .num-btns .btn-decrease{ 589 | font-size: 18px; 590 | font-weight: bold; 591 | border: 1px solid rgba(0, 0, 0, 0.5); 592 | } 593 | .prod-details .buy-item .num-btns .btn-increase:hover, 594 | .prod-details .buy-item .num-btns .btn-decrease:hover{ 595 | background-color: #DB4444; 596 | color: #ffffff; 597 | border: none; 598 | } 599 | .prod-details .buy-item .num-btns .form-control{ 600 | font-size: 18px; 601 | font-weight: bold; 602 | } 603 | .prod-details .delivery > div{ 604 | border: 1px solid #717171; 605 | border-radius: 8px; 606 | padding: 10px; 607 | -webkit-border-radius: 8px; 608 | -moz-border-radius: 8px; 609 | -ms-border-radius: 8px; 610 | -o-border-radius: 8px; 611 | } 612 | /* End Product Details */ 613 | /* Start profile */ 614 | .navbar-profile{ 615 | background-color: #F5F5F5; 616 | padding: 10px; 617 | gap: 15px; 618 | } 619 | .img-profile{ 620 | width:100%; 621 | } 622 | li.table-group-divider , 623 | .table-group-divider { 624 | border-color: #d8d8d8; 625 | } 626 | td { 627 | vertical-align: middle; 628 | } 629 | /* End profile */ 630 | /* Start Admin register & login */ 631 | .admin-register{ 632 | padding-top:30px; 633 | padding-bottom:20px; 634 | } 635 | .admin-register .row .admin-register{ 636 | width:100%; 637 | } 638 | /* End Admin register & login */ -------------------------------------------------------------------------------- /assets/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/assets/images/bg.png -------------------------------------------------------------------------------- /assets/images/bgregister.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/assets/images/bgregister.png -------------------------------------------------------------------------------- /assets/images/bgsecond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/assets/images/bgsecond.png -------------------------------------------------------------------------------- /assets/js/script.js: -------------------------------------------------------------------------------- 1 | //start product_details page -> increase, decrease items 2 | var increaseBtn = document.getElementsByClassName('btn-increase'); 3 | var decreaseBtn = document.getElementsByClassName('btn-decrease'); 4 | var itemsToBuy = document.getElementById('num_of_items'); 5 | 6 | function increaseValueBtn(){ 7 | var numero = Number(itemsToBuy.value)+1; 8 | itemsToBuy.value = numero; 9 | } 10 | function decreaseValueBtn(){ 11 | var numero = Number(itemsToBuy.value)-1; 12 | numero = numero < 0 ? 0 : numero; 13 | itemsToBuy.value = numero; 14 | } 15 | //end product_details page -> increase, decrease items 16 | -------------------------------------------------------------------------------- /includes/connect.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /includes/footer.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/includes/footer.php -------------------------------------------------------------------------------- /product_details.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce Products 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | Summer Sale For All Swim Suits And Free Express Delivery - OFF 50%! Shop Now 21 |
22 | 23 | 24 | 121 | 122 | 123 | 124 | 125 |
126 |
127 |
128 | 129 | 132 |
133 |
134 |
135 | 136 | 137 | 138 |
139 |
140 |
141 |
142 | 143 | Related Products 144 |
145 |

Discover More Products

146 |
147 |
148 | 152 |
153 |
154 | 155 |
156 |
157 |
158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /products.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce Products 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | Summer Sale For All Swim Suits And Free Express Delivery - OFF 50%! Shop Now 21 |
22 | 23 | 24 | 121 | 122 | 123 | 124 | 125 |
126 |
127 |
128 |
129 |
130 | 131 | Categories & Brands 132 |
133 |

Browse By Category & Brand

134 |
135 |
136 |
137 | 138 | 139 | 150 |
151 | 152 | 164 | 165 |
166 |
167 | 168 |
169 | 176 |
177 |
178 |
179 |
180 |
181 |
182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 209 | 210 | 211 | 212 | 213 | 214 | -------------------------------------------------------------------------------- /search_product.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce Products 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | Summer Sale For All Swim Suits And Free Express Delivery - OFF 50%! Shop Now 21 |
22 | 23 | 24 | 121 | 122 | 123 | 124 | 125 |
126 |
127 |
128 |
129 |
130 | 131 | Categories & Brands 132 |
133 |

Browse By Category & Brand

134 |
135 |
136 |
137 | 138 | 139 | 150 |
151 | 152 | 164 | 165 |
166 |
167 | 168 |
169 | 174 |
175 |
176 |
177 |
178 |
179 |
180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 207 | 208 | 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /ui/Ecommerce-Admin-Dashboard (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Admin-Dashboard (1).png -------------------------------------------------------------------------------- /ui/Ecommerce-Admin-Dashboard (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Admin-Dashboard (2).png -------------------------------------------------------------------------------- /ui/Ecommerce-Admin-Dashboard (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Admin-Dashboard (3).png -------------------------------------------------------------------------------- /ui/Ecommerce-Admin-Dashboard (4).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Admin-Dashboard (4).png -------------------------------------------------------------------------------- /ui/Ecommerce-Admin-Dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Admin-Dashboard.png -------------------------------------------------------------------------------- /ui/Ecommerce-Admin-Login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Admin-Login.png -------------------------------------------------------------------------------- /ui/Ecommerce-Admin-Registration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Admin-Registration.png -------------------------------------------------------------------------------- /ui/Ecommerce-Cart-Details-Page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Cart-Details-Page.png -------------------------------------------------------------------------------- /ui/Ecommerce-Home-Page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Home-Page.png -------------------------------------------------------------------------------- /ui/Ecommerce-Products.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/Ecommerce-Products.png -------------------------------------------------------------------------------- /ui/abdo-Profile (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/abdo-Profile (1).png -------------------------------------------------------------------------------- /ui/abdo-Profile (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/abdo-Profile (2).png -------------------------------------------------------------------------------- /ui/abdo-Profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/ui/abdo-Profile.png -------------------------------------------------------------------------------- /users_area/checkout.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce Checkout Page 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | Summer Sale For All Swim Suits And Free Express Delivery - OFF 50%! Shop Now 21 |
22 | 23 | 24 | 103 | 104 | 105 | 106 |
107 |
108 |
109 | 116 |
117 |
118 |
119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 147 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /users_area/confirm_payment.php: -------------------------------------------------------------------------------- 1 | window.alert('Payment completed successfully');"; 23 | echo ""; 24 | } 25 | //update user orders 26 | $update_orders_query = "UPDATE `user_orders` SET order_status = 'paid' WHERE order_id = $order_id"; 27 | $update_orders_result = mysqli_query($con,$update_orders_query); 28 | } 29 | ?> 30 | 31 | 32 | 33 | 34 | 35 | 36 | Payment Page 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 | We are glad to help you | we wish buy again from our store 45 |
46 | 47 |
48 |

Confirm Payment

49 |
50 |
51 |
52 |
53 | 54 | 55 |
56 |
57 | 58 | 59 |
60 |
61 | 68 |
69 |
70 | 71 |
72 |
73 |
74 |
75 |
76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /users_area/delete_account.php: -------------------------------------------------------------------------------- 1 |
2 |

Delete an account

3 |
4 |
5 |
6 |
7 | 8 |
9 |
10 | 11 |
12 |
13 |
14 |
15 |
16 | window.alert('Account deleted successfully');"; 24 | echo ""; 25 | } 26 | } 27 | if (isset($_POST['submit_dont_delete'])) { 28 | echo ""; 29 | } 30 | ?> -------------------------------------------------------------------------------- /users_area/edit_account.php: -------------------------------------------------------------------------------- 1 | window.alert('Data updated successfully');"; 33 | echo ""; 34 | } 35 | } 36 | ?> 37 | 38 | 39 | 40 | 41 | 42 | 43 | Edit Account 44 | 45 | 46 | 47 |
48 |
49 |
50 |

Edit Account

51 |
52 |
53 | 54 | 55 |
56 |
57 | 58 | 59 |
60 |
61 | 62 | 63 | <?php echo $username;?> Photo 64 |
65 |
66 | 67 | 68 |
69 |
70 | 71 | 72 |
73 |
74 | 75 |
76 |
77 |
78 |
79 |
80 | 81 | 82 | -------------------------------------------------------------------------------- /users_area/logout.php: -------------------------------------------------------------------------------- 1 | window.open('../index.php','_self');"; 6 | ?> -------------------------------------------------------------------------------- /users_area/order.php: -------------------------------------------------------------------------------- 1 | "; 32 | echo "Total Price" . $total_price."
"; 33 | echo "Qauntity" . $product_quantity."
"; 34 | } 35 | //Ordes Pending 36 | $insert_pending_order_query = "INSERT INTO `orders_pending` (user_id,invoice_number,product_id,quantity,order_status) VALUES ($user_id,$invoice_number,$product_id,$product_quantity,'$status')"; 37 | $insert_pending_order_result = mysqli_query($con,$insert_pending_order_query); 38 | } 39 | 40 | // Insert Orders 41 | $insert_order_query = "INSERT INTO `user_orders` (user_id,amount_due,invoice_number,total_products,order_date,order_status) VALUES ($user_id,$total_price,$invoice_number,$count_products,NOW(),'$status')"; 42 | $insert_order_result = mysqli_query($con,$insert_order_query); 43 | if($insert_order_result){ 44 | echo ""; 45 | echo ""; 46 | } 47 | 48 | 49 | // Delete items from card 50 | $empty_cart = "DELETE FROM `card_details` WHERE ip_address='$get_ip_address'"; 51 | $empty_cart_result = mysqli_query($con,$empty_cart); 52 | 53 | -------------------------------------------------------------------------------- /users_area/payment.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce Payment Page 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | Summer Sale For All Swim Suits And Free Express Delivery - OFF 50%! Shop Now 21 |
22 | 23 | 24 | 110 | 111 | 112 | 120 | 121 | 122 |
123 |
124 |

Payment options

125 | 154 |
155 |
156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /users_area/profile.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | <?php echo $_SESSION['username'];?> Profile 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | Summer Sale For All Swim Suits And Free Express Delivery - OFF 50%! Shop Now 24 |
25 | 26 | 27 | 113 | 114 | 115 | 116 | 117 |
118 |
119 |
120 |
121 |
122 | 123 | Profile 124 |
125 | 126 |
127 |
128 |
129 | 130 | 131 | 172 |
173 |
174 | 175 |
176 | 188 |
189 |
190 |
191 |
192 |
193 |
194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 221 | 222 | 223 | 224 | 225 | 226 | -------------------------------------------------------------------------------- /users_area/user_images/logo after 3d_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/users_area/user_images/logo after 3d_2.jpg -------------------------------------------------------------------------------- /users_area/user_images/new logo after Edit1920.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/a1bdelrahmanrezk/E-Commerce-1-Website-PHP-MYSQL/45ca81e54aacd2f00273c0270c2c74f40924504d/users_area/user_images/new logo after Edit1920.jpg -------------------------------------------------------------------------------- /users_area/user_login.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce User Login Page 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |

User Login

22 |
23 |
24 |
25 | 26 |
27 | 28 | 29 |
30 | 31 |
32 | 33 | 34 |
35 | 36 |
37 | 38 |

39 | Don't have an account? Register 40 |

41 |
42 |
43 |
44 |
45 |
46 |
47 | 48 | 49 | 50 | 51 | redirect to payment | index 61 | $select_cart_query = "SELECT * FROM `card_details` WHERE ip_address='$user_ip'"; 62 | $select_cart_result = mysqli_query($con, $select_cart_query); 63 | $row_cart_count = mysqli_num_rows($select_cart_result); 64 | //user check about username & pass 65 | if ($row_count > 0) { 66 | if (password_verify($user_password, $row_data['user_password'])) { 67 | // echo ""; 68 | $_SESSION['username'] = $user_username; 69 | if ($row_count == 1 && $row_cart_count == 0) { 70 | $_SESSION['username'] = $user_username; 71 | echo ""; 72 | echo ""; 73 | } else if ($row_count == 1 && $row_cart_count > 0) { 74 | $_SESSION['username'] = $user_username; 75 | echo ""; 76 | echo ""; 77 | } 78 | } else { 79 | echo ""; 80 | } 81 | } else { 82 | echo ""; 83 | } 84 | } 85 | ?> -------------------------------------------------------------------------------- /users_area/user_orders.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | User Orders Page 8 | 9 | 10 | 11 | 19 |
20 |

21 | All my orders 22 |

23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 62 | 63 | ":" 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 75 | 76 | " ; 77 | $serial_number++; 78 | } 79 | ?> 80 | 81 |
Serial NO.Order NumberAmount dueTotal ProductsInvoice NumberDateStatusConfirm
$serial_number$order_id$amount_due$total_products$invoice_number$order_date$order_status 60 | Confirm 61 |
$serial_number$order_id$amount_due$total_products$invoice_number$order_date$order_status 73 | Confirmed 74 |
82 |
83 | 84 | 85 | -------------------------------------------------------------------------------- /users_area/user_registration.php: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Ecommerce User Registeration Page 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |

New User Registration

22 |
23 |
24 |
25 | 26 |
27 | 28 | 29 |
30 | 31 |
32 | 33 | 34 |
35 | 36 |
37 | 38 | 39 |
40 | 41 |
42 | 43 | 44 |
45 | 46 |
47 | 48 | 49 |
50 | 51 |
52 | 53 | 54 |
55 | 56 |
57 | 58 | 59 |
60 |
61 | 62 |

63 | Already have an account? Login 64 |

65 |
66 |
67 |
68 |
69 |
70 |
71 | 72 | 73 | 74 | 75 | 76 | 0) { 93 | echo ""; 94 | } else if ($user_password != $conf_user_password) { 95 | echo ""; 96 | } else { 97 | // insert query 98 | move_uploaded_file($user_image_tmp, "./user_images/$user_image"); 99 | $insert_query = "INSERT INTO `user_table` (username,user_email,user_password,user_image,user_ip,user_address,user_mobile) VALUES ('$user_username','$user_email','$hash_password','$user_image','$user_ip','$user_address','$user_mobile')"; 100 | $insert_result = mysqli_query($con, $insert_query); 101 | if ($insert_result) { 102 | echo ""; 103 | } else { 104 | die(mysqli_error($con)); 105 | } 106 | } 107 | // //select cart items check if items in cart go to checkout !| go to index.php 108 | // $select_cart_items = "SELECT * FROM `card_details` WHERE ip_address='$user_ip'"; 109 | // $select_cart_items_result = mysqli_query($con,$select_cart_items); 110 | // $rows_count_cart_items = mysqli_num_rows($select_cart_items_result); 111 | // if($rows_count_cart_items > 0 ){ 112 | // $_SESSION['username'] = $user_username; 113 | // echo ""; 114 | // echo ""; 115 | // }else{ 116 | // echo ""; 117 | // } 118 | } 119 | ?> --------------------------------------------------------------------------------