Abiodun Afolabi
Team Copenhagen Task 2(Signup and Login form)

The HNG internship kicked off last Sunday September 15th, 2019 and tasks were assigned to all tracks.... We were also told to form groups consisting of 10 members per group(at least 2 members from Frontend/Backend/Design Tracks) to create a basic login/signup website with authentication.... I was fortunate to be in Team Copenhagen(i cannot pronounce it well enough :( )... We all came together and tasks were assigned to members of the team... I was involved in both the frontend and backend aspect of the task but majorly backend... Programming Languages for the Task HTML5 CSS3 JAVASCRIPT PHP **Step1**: The people in charge of the design posted samples of the designs they did via Figma and we all agreed to go with the best... **Step 2**: After agreeing on the design to use, the frontend guys(including me) started coding using HTML5 and CSS3 with respect to the design given... Also we made collaborations via github(we have more than 30 commits on our repo)... We had issues with responsiveness on mobile but we solved it... **Step 3**: I and the team Leader made use of JAVASCRIPT to validate the signup form... We had the following into considerations before anyone can register successfully **Step 4**: This is the part where i got my hands dirty on PHP.. _session\_start(); _ _$db = mysqli\_connect("localhost", "root", "", "copenhagen");_ **For the signup form**, a name is already set for the register button "submitBtn", if the button is clicked, it will check if username already exists, authenticate(j.s already did this) and store the information in the database... Passwords are stored securely in the db using md5 hash.. _if(isset($\_POST\['submitBtn'\])){_ _$username = $\_POST\['username'\];_ _  $email = $\_POST\['email'\];_ _  $password = $\_POST\['password'\];_ _  $password = md5($password);_ _  $s = mysqli\_query($db, "SELECT \* FROM users WHERE username = '{$username}'");_ _if(!$s){_ _die("unable to connect: " .mysqli\_error($db));_ _}_ _$num = mysqli\_num\_rows($s);_ _if($num == 1){_ _array\_push($errors, "Username exists");_ _} else{_ _$reg = mysqli\_query($db, "INSERT INTO users(username, email, password) _ _VALUES('$username', '$email', '$password')");_ _if(!$reg){_ _die("unable to connect: " . mysqli\_error($db));_ _}_ _header("Location: index.php");_ _}_ _}_ **For the Login authentication**: A button was set "loginBtn" and if clicked, it checks for all conditions below and logs into home.php... Conditions below * Username must be equal to username in database 2 .Password must be equal to password in database 3.Username and Password cannot be blank If all conditions are met, user will be redirected to the **home.php** where you see **"Welcome $username"...** Lastly, I added a logout link where users can logout, and it is redirected to the login page... A GET variable was set "logout=1"... _if(isset($\_GET\['logout'\])){_ _session\_destroy();_ _unset($\_SESSION\['username'\]);_ _header("Location: index.php");_ _}_ **THANK YOU FOR YOUR TIME :)**

Abiodun Afolabi
FIRST CODE TASK(HTML)

As a junior developer, i am not new to html but i really learned some new things during this class... HTML is just that guy with less fashion taste but a key language in the world of web development...

Abiodun Afolabi
My Experience so far at StartNg

WHAT I HAVE LEARNED SO FAR Basics of using slack Using /note on slack Use of developer tools on chrome WHAT I WISH TO LEARN Javascript MEAN STACK (MongoDB, ExpressJS, AngularJS and Node...