I have a dilemma i just can't figure out, and i need your help. The thing is, I wish to display the ip address of the logged in user in my custom form. The problem i have is how do i make it based on the logged in user?
The following is the code i used:
$hostname = db_query("SELECT hostname FROM {accesslog} WHERE uid = :uid LIMIT 1', array(':uid' =>33));
echo "Hostname:" . $hostname . "
";