├── Home.php ├── app.js ├── config.php ├── css └── style1.css ├── index.php ├── logout.php ├── profile.php ├── register.php ├── style2.css ├── update.php └── validation.php /Home.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 15 | 16 | 17 | 18 | User profile 19 | 20 | 21 | 22 | 23 | 35 | 36 | 37 | 45 |
46 | 47 | Welcome to the Home Page!! 48 | 49 |
50 | 51 | 52 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | let wrapper = document.querySelector('.wrapper'), 2 | signUpLink = document.querySelector('.link .signup-link'), 3 | signInLink = document.querySelector('.link .signin-link'); 4 | 5 | signUpLink.addEventListener('click', () => { 6 | wrapper.classList.add('animated-signin'); 7 | wrapper.classList.remove('animated-signup'); 8 | }); 9 | 10 | signInLink.addEventListener('click', () => { 11 | wrapper.classList.add('animated-signup'); 12 | wrapper.classList.remove('animated-signin'); 13 | }); -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | connect_error){ 11 | die("DB connection failed... ERROR = ".$conn -> connect_error); 12 | } 13 | 14 | 15 | ?> -------------------------------------------------------------------------------- /css/style1.css: -------------------------------------------------------------------------------- 1 | .Nav 2 | { 3 | background-color: rgb(199, 200, 195); 4 | height: 10vh; 5 | width: 100vw; 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | } 10 | .Nav h1 11 | { 12 | font-size: 15px; 13 | } 14 | 15 | .navi_1 16 | { 17 | margin-left: 75%; 18 | } 19 | .part1 20 | { 21 | width:50%; 22 | height:200px; 23 | margin:10px; 24 | position:flex; 25 | } 26 | .Register_form 27 | { 28 | background: linear-gradient(45deg, dodgerblue, white, purple); 29 | width: 30vw; 30 | padding: 30px; 31 | margin: auto; 32 | display: none; 33 | margin-top: 10%; 34 | border-radius: 10PX; 35 | } 36 | .body{ 37 | background-color: white; 38 | background-size: cover; 39 | height: 100vh; 40 | background-image: url("https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/f9de6eb5-611b-4737-8688-f0296b643f95/d2ga4cw-d1026c1c-15fa-4c28-8dbe-c8a46c301277.jpg"); 41 | background-position: center; 42 | background-repeat: no-repeat; 43 | } 44 | 45 | 46 | .Login_form 47 | { 48 | background: linear-gradient(45deg, dodgerblue, white, purple); 49 | width: 30vw; 50 | padding: 20px; 51 | margin: auto; 52 | margin-top: 10%; 53 | border-radius: 8px; 54 | position: relative; 55 | overflow: hidden; 56 | } 57 | 58 | 59 | .update_form 60 | { 61 | position: absolute; 62 | display:flex; 63 | width:60vw; 64 | height:70vh; 65 | left: 25%; 66 | margin-top: 5%; 67 | } 68 | .mb-3 69 | { 70 | width:100%; 71 | padding: 10px; 72 | border-radius: 20px; 73 | } 74 | label 75 | { 76 | font-size: 15px; 77 | } 78 | 79 | /* .profile_div 80 | { 81 | width: 100vw; 82 | display: flex; 83 | justify-content: center; 84 | align-items: center; 85 | margin-top: 30px;https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/i/f9de6eb5-611b-4737-8688-f0296b643f95/d2ga4cw-d1026c1c-15fa-4c28-8dbe-c8a46c301277.jpg 86 | } */ 87 | .profile_body 88 | { 89 | background-image: url("https://images.unsplash.com/photo-1464618663641-bbdd760ae84a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8d2Vic2l0ZSUyMGJhY2tncm91bmR8ZW58MHx8MHx8fDA%3D&w=1000&q=80"); 90 | background-position: absolute; 91 | height: 100vh; 92 | background-size: cover; 93 | background-repeat: no-repeat; 94 | } 95 | 96 | .btn 97 | { 98 | width: 2cm; 99 | height: 1cm; 100 | 101 | font-size: 15px; 102 | font-family: inherit; 103 | border: none; 104 | position: relative; 105 | cursor: pointer; 106 | overflow: hidden; 107 | z-index: 1; 108 | } 109 | 110 | 111 | .btn::before 112 | { 113 | content: ''; 114 | width: 0; 115 | height: 1cm; 116 | position: absolute; 117 | top: 0; 118 | left: 0; 119 | background-image: linear-gradient(to right, #f5f9fa 0%, #11110d 100%); 120 | transition: .5s ease; 121 | display: block; 122 | z-index: -1; 123 | } 124 | 125 | .btn:hover::before 126 | { 127 | width: 3cm; 128 | } 129 | 130 | #profile-im 131 | { 132 | border-radius: 35px; 133 | } 134 | .profile_div 135 | { 136 | margin-left: 10px; 137 | } 138 | 139 | .Login_form::before 140 | { 141 | content: ''; 142 | position: absolute; 143 | inset: 0; 144 | transform: rotate(-5deg); 145 | z-index: -1; 146 | background: grey; 147 | } 148 | 149 | .logo 150 | { 151 | position: absolute; 152 | height: auto; 153 | left: 0px; 154 | width: 74px; 155 | } 156 | 157 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Login / Registration form 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 20 |
21 |
22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 |
30 |
31 | 32 | 33 |
34 | 35 | 36 |
37 | 38 | 39 | 40 | 53 |
54 |
55 | 264 | 265 | 266 | 267 | 268 | 269 | -------------------------------------------------------------------------------- /logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /profile.php: -------------------------------------------------------------------------------- 1 | alert('Unexpected Error'); "; 37 | } 38 | ?> 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | User profile 47 | 48 | 49 | 50 | 51 | 53 | 54 | 55 | 63 |

Welcome

64 |

Profile

65 |
66 | 67 |
68 | 69 |
70 | 71 | 72 |
73 |
74 | 75 | 76 |
77 |
78 | 79 | 80 |
81 |
82 | 83 | 84 |
85 | 86 |
87 |
88 |
89 | 90 | 91 |
92 | 93 |
94 |
95 | 96 | 97 |
98 |
99 | 100 | 101 |
102 | 106 | 107 |
108 | 109 |
110 |
111 | 112 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /register.php: -------------------------------------------------------------------------------- 1 | 'success']; 37 | echo json_encode($response); 38 | } 39 | else 40 | { 41 | 42 | if(mysqli_errno($conn) == 1062) 43 | { 44 | // SEND ERROR RESPONSE 45 | 46 | $response = ['status' => 'failed','error' => 'Email_already_taken']; 47 | echo json_encode($response); 48 | } 49 | else 50 | { 51 | // SEND ERROR RESPONSE 52 | 53 | $response = ['status' => 'failed','error' => mysqli_error($conn)]; 54 | echo json_encode($response); 55 | } 56 | } 57 | 58 | 59 | // ------------ // 60 | 61 | 62 | 63 | 64 | ?> -------------------------------------------------------------------------------- /style2.css: -------------------------------------------------------------------------------- 1 | .profile_body 2 | { 3 | /* background-color: aliceblue; */ 4 | background-image: url("book.jpg"); 5 | background-size: cover; 6 | position: fixed; 7 | } 8 | .Nav_all 9 | { 10 | height: 10vh; 11 | width: 100vw; 12 | display: flex; 13 | justify-content: center; 14 | align-items: center; 15 | color: #0c0464a0; 16 | font-weight: bold; 17 | font-size: larger; 18 | margin-left: 5%; 19 | 20 | } 21 | .update_form 22 | { 23 | position: absolute; 24 | display:flex; 25 | width:60vw; 26 | height:70vh; 27 | left: 25%; 28 | margin-top: 5%; 29 | } 30 | .part1 31 | { 32 | width:50%; 33 | height:200px; 34 | margin:10px; 35 | position:flex; 36 | } 37 | .form-control 38 | { 39 | width: 20vw !important; 40 | } 41 | .profile_image 42 | { 43 | margin-left: 40%; 44 | display: flex; 45 | } 46 | #profile-im 47 | { 48 | border-radius: 35px; 49 | } 50 | .profile_div 51 | { 52 | margin-left: 10px; 53 | } 54 | .form-label 55 | { 56 | color: #991B34; 57 | font-weight: bold; 58 | font-size: larger; 59 | } 60 | .form-control 61 | { 62 | border-radius: 5px !important; 63 | border-color: #991B34 !important; 64 | } -------------------------------------------------------------------------------- /update.php: -------------------------------------------------------------------------------- 1 | 'success']; 30 | echo json_encode($response); 31 | } 32 | else 33 | { 34 | // send response for found unexpected error 35 | 36 | $response = ['status' => 'failed','error' => mysqli_error($conn)]; 37 | echo json_encode($response); 38 | } 39 | 40 | ?> -------------------------------------------------------------------------------- /validation.php: -------------------------------------------------------------------------------- 1 | 'success']; 31 | echo json_encode($response); 32 | } 33 | else 34 | { 35 | $response = ['status' => 'Invalid']; 36 | echo json_encode($response); 37 | } 38 | } 39 | 40 | else 41 | { 42 | $response = ['status' => 'Error','Error' => mysqli_error($conn)]; 43 | echo json_encode($response); 44 | } 45 | 46 | ?> --------------------------------------------------------------------------------