'; if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { $photo = $row["photo"]; $hatnumber = $row["hatnumber"]; $hashname = $row["hashname"]; $email = $row["email"]; $bio = $row["bio"]; echo '
More about '.$hashname.'
'; $contactme = 'email'; $weburl = $row["website"]; $facebookurl = $row["facebook"]; if(!preg_match('/http[s]?:\/\//', $weburl, $matches)) $weburl = 'https://'.$weburl; if(!preg_match('/http[s]?:\/\//', $facebookurl, $matches)) $facebookurl = 'https://'.$facebookurl; $weburl = '.'.$weburl.''; echo "
Name:- ". $row["firstname"]. " " . $row["surname"]. "
Hash Handle:- " . $row["hashname"]. "
Hat #" . $row["hatnumber"]."
Current Location:- " . $row["currentlocation"]. "
Hash or personal web site:- " . $weburl. "
My facebook Page:- " .$facebookurl."
Contact ".$hashname.' by ' .$contactme."
My current Info
" . $row["bio"]; } } mysqli_close($con); ?>