I need to get the computer IP address and I need to check if that IP address is in my database. If it was, I need to display the name registered to that IP address that was in my database.
Actually I am confused because there were no error detected yet there were no output displayed.
Here's my code
<?php
$ipname = gethostbyname(trim(`hostname`));
$ip_query = "SELECT ip_address FROM table 5";
$ip_add = mysql_query($ip_query);
if ($ip_add === $ipname){
echo "{$ip_add['guest_name']}";
}
?>