├── README.md ├── bootstrap ├── BootstrapAssignment.pdf ├── cart.html ├── images │ ├── camera.jpg │ ├── intro-bg_1.jpg │ ├── shirt.jpg │ └── watch.jpg ├── index.css ├── index.html ├── login.html ├── logout.html ├── products.html ├── settings.html ├── signup.html └── success.html ├── html_css ├── HTML _ CSS Assignment.pdf ├── images │ ├── camera.jpg │ ├── intro-bg_1.jpg │ ├── shirt.jpg │ └── watch.jpg ├── index.css └── index.html ├── php ├── PHP Assignment.pdf ├── cart-add.php ├── cart-remove.php ├── cart.php ├── images │ ├── camera.jpg │ ├── intro-bg_1.jpg │ ├── shirt.jpg │ └── watch.jpg ├── includes │ ├── check-if-added.php │ ├── common.php │ ├── footer.php │ └── header.php ├── index.css ├── index.php ├── login.php ├── login_submit.php ├── logout.php ├── products.php ├── settings.php ├── settings_script.php ├── signup.php ├── signup_script.php └── success.php └── sql ├── MySQL Assignment.pdf ├── create.sql └── insert.sql /README.md: -------------------------------------------------------------------------------- 1 | # Internshala Web Developement Assignments 2 | This is the project repository for my assignments in Internshala Web Developement Training. 3 | 4 | ## Topics 5 | * **Module1** : HTML & CSS 6 | * **Module2** : Bootstrap 7 | * **Module3** : SQL 8 | * **Module4** : PHP 9 | 10 | -------------------------------------------------------------------------------- /bootstrap/BootstrapAssignment.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/bootstrap/BootstrapAssignment.pdf -------------------------------------------------------------------------------- /bootstrap/cart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | My Cart 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
Item NumberItem NamePrice
1Watch0
Total: 0Confirm Order
57 |
58 | 64 | 65 | -------------------------------------------------------------------------------- /bootstrap/images/camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/bootstrap/images/camera.jpg -------------------------------------------------------------------------------- /bootstrap/images/intro-bg_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/bootstrap/images/intro-bg_1.jpg -------------------------------------------------------------------------------- /bootstrap/images/shirt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/bootstrap/images/shirt.jpg -------------------------------------------------------------------------------- /bootstrap/images/watch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/bootstrap/images/watch.jpg -------------------------------------------------------------------------------- /bootstrap/index.css: -------------------------------------------------------------------------------- 1 | #banner-image { 2 | padding-top: 75px; 3 | padding-bottom: 50px; 4 | text-align: center; 5 | color: #f8f8f8; 6 | background: url("images/intro-bg_1.jpg"); 7 | background-position: center; 8 | background-repeat: no-repeat; 9 | background-size: cover; 10 | } 11 | #banner_content { 12 | position: relative; 13 | padding-top: 6%; 14 | padding-bottom: 6%; 15 | margin: 12% auto; 16 | background-color: rgba(0, 0, 0, 0.7); 17 | max-width: 660px; 18 | } 19 | footer { 20 | position: fixed; 21 | padding: 10px 0; 22 | text-align: center; 23 | bottom: 0; 24 | background-color: #101010; 25 | color: #9d9d9d; 26 | width: 100%; 27 | } 28 | .panel-margin { 29 | margin-top: 80px; 30 | margin-bottom: 80px; 31 | } 32 | .text-centre { 33 | text-align: center; 34 | } -------------------------------------------------------------------------------- /bootstrap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LifeStyle Stores 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 33 | 44 | 50 | 51 | -------------------------------------------------------------------------------- /bootstrap/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Login to LifeStyle Stores 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 33 |
34 |
35 |
36 |

Login to make purchase

37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 | 45 |
46 | 47 |
48 |
49 | 52 |
53 |
54 | 60 | 61 | -------------------------------------------------------------------------------- /bootstrap/logout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LifeStyle Stores 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 33 |
34 |
35 | You have successfully logged out. Click here to go back to index page. 36 |
37 |
38 | 44 | 45 | -------------------------------------------------------------------------------- /bootstrap/products.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LifeStyle Stores 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 36 |
37 |
38 |

Welcome to our LifeStyle Store!

39 |

We have the best cameras, watches and shirts for you. No need to hunt 40 | around, we have all in one place.

41 |
42 |
43 |
44 |
45 | camera 46 |
47 |

Camera 1

48 |

Price: 80,000

49 | 50 |
51 |
52 |
53 |
54 |
55 | camera 56 |
57 |

Camera 2

58 |

Price: 80,000

59 | 60 |
61 |
62 |
63 |
64 |
65 | camera 66 |
67 |

Camera 3

68 |

Price: 80,000

69 | 70 |
71 |
72 |
73 |
74 |
75 | camera 76 |
77 |

Camera 4

78 |

Price: 80,000

79 | 80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 | shirt 88 |
89 |

Shirt 1

90 |

Price: 700

91 | 92 |
93 |
94 |
95 |
96 |
97 | shirt 98 |
99 |

Shirt 2

100 |

Price: 700

101 | 102 |
103 |
104 |
105 |
106 |
107 | shirt 108 |
109 |

Shirt 3

110 |

Price: 700

111 | 112 |
113 |
114 |
115 |
116 |
117 | shirt 118 |
119 |

Shirt 4

120 |

Price: 700

121 | 122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | watch 130 |
131 |

Watch 1

132 |

Price: 1000

133 | 134 |
135 |
136 |
137 |
138 |
139 | watch 140 |
141 |

Watch 2

142 |

Price: 1000

143 | 144 |
145 |
146 |
147 |
148 |
149 | watch 150 |
151 |

Watch 3

152 |

Price: 1000

153 | 154 |
155 |
156 |
157 |
158 |
159 | watch 160 |
161 |

Watch 4

162 |

Price: 1000

163 | 164 |
165 |
166 |
167 |
168 |
169 | 175 | 176 | -------------------------------------------------------------------------------- /bootstrap/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LifeStyle Stores 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 34 |
35 |
36 |
37 |

Change Password

38 |
39 |
40 |
41 |
42 | 43 |
44 |
45 | 46 |
47 |
48 | 49 |
50 | 51 |
52 |
53 |
54 |
55 | 61 | 62 | -------------------------------------------------------------------------------- /bootstrap/signup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LifeStyle Stores 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 33 |
34 |
35 |
36 |

SignUp

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 | 64 |
65 |
66 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /bootstrap/success.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Success 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 34 |
35 |
36 | Your order is confirmed. Thank you for shopping with us. 37 | Click here to purchase any other item. 38 |
39 |
40 | 46 | 47 | -------------------------------------------------------------------------------- /html_css/HTML _ CSS Assignment.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/html_css/HTML _ CSS Assignment.pdf -------------------------------------------------------------------------------- /html_css/images/camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/html_css/images/camera.jpg -------------------------------------------------------------------------------- /html_css/images/intro-bg_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/html_css/images/intro-bg_1.jpg -------------------------------------------------------------------------------- /html_css/images/shirt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/html_css/images/shirt.jpg -------------------------------------------------------------------------------- /html_css/images/watch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/html_css/images/watch.jpg -------------------------------------------------------------------------------- /html_css/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | width: 100%; 3 | height: 100%; 4 | margin: 0; 5 | } 6 | a { 7 | text-decoration: none; 8 | background-color: transparent; 9 | color:#ededed; 10 | } 11 | .header { 12 | background-color: #000; 13 | color: #fff; 14 | border-color: #080808; 15 | min-height: 50px; 16 | border: 1px solid transparent; 17 | } 18 | .inner-header { 19 | width: 80%; 20 | margin: auto; 21 | } 22 | .logo { 23 | float: left; 24 | height: 50px; 25 | padding: 15px; 26 | font-size: 20px; 27 | font-weight: bold; 28 | } 29 | .header-link { 30 | float: right; 31 | font-size: 16px; 32 | height: 50px; 33 | padding: 15px; 34 | font-weight: bold; 35 | } 36 | .content { 37 | min-height: 600px; 38 | } 39 | .banner-image { 40 | padding-bottom: 50px; 41 | color: #f8f8f8; 42 | text-align: center; 43 | background-image: url("images/intro-bg_1.jpg"); 44 | background-repeat: no-repeat; 45 | background-position: center center; 46 | background-size: cover; 47 | } 48 | .inner-banner-image { 49 | padding-top: 12%; 50 | width: 80%; 51 | margin: auto; 52 | } 53 | .banner-content { 54 | position: relative; 55 | padding-top: 6%; 56 | padding-bottom: 6%; 57 | overflow: hidden; 58 | margin: auto; 59 | background-color: rgba(0, 0, 0, 0.7); 60 | max-width: 660px; 61 | } 62 | .button { 63 | color: #fff; 64 | background-color: #c9302c; 65 | border-color: #ac2925; 66 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); 67 | padding: 10px 16px; 68 | font-size: 18px; 69 | border-radius: 6px; 70 | } 71 | .container { 72 | width: 90%; 73 | margin: auto; 74 | overflow: hidden; 75 | text-align: center; 76 | } 77 | .items { 78 | width: 30%; 79 | display: block; 80 | padding: 4px; 81 | margin-bottom: 20px; 82 | line-height: 1.42857143; 83 | background-color: #fff; 84 | border: 1px solid #ddd; 85 | border-radius: 4px; 86 | float: left; 87 | margin-left: 1%; 88 | } 89 | .thumbnails { 90 | display: block; 91 | max-width: 100%; 92 | height: auto; 93 | } 94 | .caption { 95 | color: #000; 96 | padding: 0px 10px 10px; 97 | font-weight: bold; 98 | text-align: center; 99 | } 100 | footer { 101 | background-color: #000; 102 | color: #fff; 103 | font-size: 14px; 104 | } 105 | -------------------------------------------------------------------------------- /html_css/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Lifestyle Store! 5 | 6 | 7 | 8 |
9 |
10 | 13 | 16 | 19 |
20 |
21 |
22 | 31 |
32 |
33 |
34 | 35 | 36 |
37 |

Watches

38 |

Original watches from the best brands.

39 |
40 |
41 |
42 |
43 | 44 | 45 |
46 |

Camera

47 |

Choose among the best in the world.

48 |
49 |
50 |
51 |
52 | 53 | 54 |
55 |

Shirts

56 |

Our exquisite collection of shirts.

57 |
58 |
59 |
60 |
61 | 66 | 67 | -------------------------------------------------------------------------------- /php/PHP Assignment.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/php/PHP Assignment.pdf -------------------------------------------------------------------------------- /php/cart-add.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/cart-remove.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/cart.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | My Cart 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | Add products to cart first. Goto Products page.'; 35 | }else{ 36 | $total = 0; 37 | ?> 38 |
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
Item NumberItem NamePrice
">Remove
Total: Confirm Order
63 |
64 | 68 | 69 | -------------------------------------------------------------------------------- /php/images/camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/php/images/camera.jpg -------------------------------------------------------------------------------- /php/images/intro-bg_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/php/images/intro-bg_1.jpg -------------------------------------------------------------------------------- /php/images/shirt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/php/images/shirt.jpg -------------------------------------------------------------------------------- /php/images/watch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/php/images/watch.jpg -------------------------------------------------------------------------------- /php/includes/check-if-added.php: -------------------------------------------------------------------------------- 1 | = 1){ 10 | return TRUE; 11 | }else{ 12 | return FALSE; 13 | } 14 | } 15 | ?> -------------------------------------------------------------------------------- /php/includes/common.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/includes/footer.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/includes/header.php: -------------------------------------------------------------------------------- 1 | 33 | -------------------------------------------------------------------------------- /php/index.css: -------------------------------------------------------------------------------- 1 | #banner-image { 2 | padding-top: 75px; 3 | padding-bottom: 50px; 4 | text-align: center; 5 | color: #f8f8f8; 6 | background: url("images/intro-bg_1.jpg"); 7 | background-position: center; 8 | background-repeat: no-repeat; 9 | background-size: cover; 10 | } 11 | #banner_content { 12 | position: relative; 13 | padding-top: 6%; 14 | padding-bottom: 6%; 15 | margin: 12% auto; 16 | background-color: rgba(0, 0, 0, 0.7); 17 | max-width: 660px; 18 | } 19 | footer { 20 | position: fixed; 21 | padding: 10px 0; 22 | text-align: center; 23 | bottom: 0; 24 | background-color: #101010; 25 | color: #9d9d9d; 26 | width: 100%; 27 | } 28 | .panel-margin { 29 | margin-top: 80px; 30 | margin-bottom: 80px; 31 | } 32 | .text-centre { 33 | text-align: center; 34 | } -------------------------------------------------------------------------------- /php/index.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | LifeStyle Stores 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 37 | 40 | 41 | -------------------------------------------------------------------------------- /php/login.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | Login to LifeStyle Stores 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 21 |
22 |
23 |
24 |

Login to make purchase

25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | 33 |
34 | 35 |
36 |
37 | 40 |
41 |
42 | 45 | 46 | -------------------------------------------------------------------------------- /php/login_submit.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/logout.php: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | LifeStyle Stores 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 |
30 |
31 | You have successfully logged out. Click here to go back to index page. 32 |
33 |
34 | 37 | 38 | -------------------------------------------------------------------------------- /php/products.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | LifeStyle Stores 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 |
25 |
26 |

Welcome to our LifeStyle Store!

27 |

We have the best cameras, watches and shirts for you. No need to hunt 28 | around, we have all in one place.

29 |
30 |
31 |
32 |
33 | camera 34 |
35 |

Camera 1

36 |

Price: 80,000

37 | 38 | Add to cart 39 | 40 | 41 | Added to cart 42 | 43 | Add to cart 44 | 46 |
47 |
48 |
49 |
50 |
51 | camera 52 |
53 |

Camera 2

54 |

Price: 80,000

55 | 56 | Add to cart 57 | 58 | 59 | Added to cart 60 | 61 | Add to cart 62 | 64 |
65 |
66 |
67 |
68 |
69 | camera 70 |
71 |

Camera 3

72 |

Price: 80,000

73 | 74 | Add to cart 75 | 76 | 77 | Added to cart 78 | 79 | Add to cart 80 | 82 |
83 |
84 |
85 |
86 |
87 | camera 88 |
89 |

Camera 4

90 |

Price: 80,000

91 | 92 | Add to cart 93 | 94 | 95 | Added to cart 96 | 97 | Add to cart 98 | 100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | shirt 108 |
109 |

Shirt 1

110 |

Price: 700

111 | 112 | Add to cart 113 | 114 | 115 | Added to cart 116 | 117 | Add to cart 118 | 120 |
121 |
122 |
123 |
124 |
125 | shirt 126 |
127 |

Shirt 2

128 |

Price: 700

129 | 130 | Add to cart 131 | 132 | 133 | Added to cart 134 | 135 | Add to cart 136 | 138 |
139 |
140 |
141 |
142 |
143 | shirt 144 |
145 |

Shirt 3

146 |

Price: 700

147 | 148 | Add to cart 149 | 150 | 151 | Added to cart 152 | 153 | Add to cart 154 | 156 |
157 |
158 |
159 |
160 |
161 | shirt 162 |
163 |

Shirt 4

164 |

Price: 700

165 | 166 | Add to cart 167 | 168 | 169 | Added to cart 170 | 171 | Add to cart 172 | 174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 | watch 182 |
183 |

Watch 1

184 |

Price: 1000

185 | 186 | Add to cart 187 | 188 | 189 | Added to cart 190 | 191 | Add to cart 192 | 194 |
195 |
196 |
197 |
198 |
199 | watch 200 |
201 |

Watch 2

202 |

Price: 1000

203 | 204 | Add to cart 205 | 206 | 207 | Added to cart 208 | 209 | Add to cart 210 | 212 |
213 |
214 |
215 |
216 |
217 | watch 218 |
219 |

Watch 3

220 |

Price: 1000

221 | 222 | Add to cart 223 | 224 | 225 | Added to cart 226 | 227 | Add to cart 228 | 230 |
231 |
232 |
233 |
234 |
235 | watch 236 |
237 |

Watch 4

238 |

Price: 1000

239 | 240 | Add to cart 241 | 242 | 243 | Added to cart 244 | 245 | Add to cart 246 | 248 |
249 |
250 |
251 |
252 |
253 | 256 | 257 | -------------------------------------------------------------------------------- /php/settings.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | LifeStyle Stores 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 |
26 |
27 |
28 |

Change Password

29 |
30 |
31 |
32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 | 40 |
41 | 42 |
43 |
44 |
45 |
46 | 49 | 50 | -------------------------------------------------------------------------------- /php/settings_script.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php/signup.php: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | LifeStyle Stores 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 |
25 |
26 |
27 |

SignUp

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 | 55 |
56 |
57 | 60 | 61 | -------------------------------------------------------------------------------- /php/signup_script.php: -------------------------------------------------------------------------------- 1 | 0){ 18 | // email already exists 19 | echo "Email id already exists. Try another"; 20 | }else{ 21 | // perform query operation 22 | $result = mysqli_query($conn, $query2); 23 | $_SESSION["email_id"] = $email; 24 | $_SESSION["id"] = mysqli_insert_id($conn); 25 | 26 | // redirect to products page 27 | header("location: products.php"); 28 | } 29 | ?> -------------------------------------------------------------------------------- /php/success.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | Success 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 37 |
38 |
39 | Your order is confirmed. Thank you for shopping with us. 40 | Click here to purchase any other item. 41 |
42 |
43 | 46 | 47 | -------------------------------------------------------------------------------- /sql/MySQL Assignment.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Roy19/internshala_assignments/9f307b2eb88d9e1b302798a17dd24f2e163014d2/sql/MySQL Assignment.pdf -------------------------------------------------------------------------------- /sql/create.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE store; 2 | 3 | CREATE TABLE store.items( 4 | id INT(11) PRIMARY KEY AUTO_INCREMENT, 5 | name VARCHAR(255) NOT NULL, 6 | price INT(11) NOT NULL); 7 | 8 | CREATE TABLE store.users( 9 | id INT(11) PRIMARY KEY AUTO_INCREMENT, 10 | name VARCHAR(255) NOT NULL, 11 | email VARCHAR(255) NOT NULL, 12 | password VARCHAR(255) NOT NULL, 13 | contact VARCHAR(255) NOT NULL, 14 | city VARCHAR(255) NOT NULL, 15 | address VARCHAR(255) NOT NULL); 16 | 17 | CREATE TABLE store.users_items( 18 | id INT(11) PRIMARY KEY AUTO_INCREMENT, 19 | user_id INT(11) NOT NULL, 20 | item_id INT(11) NOT NULL, 21 | status enum('Added to cart', 'Confirmed') NOT NULL, 22 | FOREIGN KEY(user_id) REFERENCES users(id) ON UPDATE CASCADE, 23 | FOREIGN KEY(item_id) REFERENCES items(id) ON UPDATE CASCADE); 24 | 25 | -------------------------------------------------------------------------------- /sql/insert.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO items(id, name, price) 2 | VALUES 3 | (1, 'Canon EOS',36000), 4 | (2, 'Nikon DSLR',40000), 5 | (3, 'Sony DSLR', 45000), 6 | (4, 'Olympus DSLR', 50000), 7 | (5, 'Titan Model #301', 13000), 8 | (6, 'Titan Model #201', 3000), 9 | (7, 'HMT Milan', 8000), 10 | (8, 'Faber Luba #111', 18000), 11 | (9, 'H&W', 800), 12 | (10, 'Luis Phil', 1000), 13 | (11, 'John Zok', 1500), 14 | (12, 'Jhalsani', 1300); 15 | --------------------------------------------------------------------------------