After the user has inputted their respective username and password, it will be validates and if the submitted information was true, they will redirected a page. Now, I just want to the the php code that captures the username and display it on the page. Like "Welcome BooBoy08 to here..". Please help.

Depends on your look up feature.

But general idea is:

Welcome back <b> <?= $user ?>, We have missed you!

Why don't you put it in a session var??? And then display it with something like echo $var; ?? Don't worry about missing name if this var is empty so the user is not logged in.

When the user logs in, check if he's a valid user. If he's a valid user, add that username to a session variable. Use that session variable in the next page where you want to display his name. A small eg.

<?php //page1.php
// check if the user is valid
if (valid user){
redirect to page2.php
} else {
 //error message

And this is page2.php

 echo "Welcome ". $_SESSION['username'];
} else {
  echo "Not logged in ! ";

Hope that helps.