jd2007 Posted July 18, 2007 Share Posted July 18, 2007 1. how do i get the ip address of the user visiting a page ? 2. echo "<span><pre> $row[0] $row[3] This link worked for $row[1] out of $total people. DID THIS LINK WORK FOR YOU ? <a href='worked.php'>YES</a> <a href='notworked.php'>NO</a> </pre> </span>"; echo "<br>"; i want the output above display text with gray background color...how ? Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/ Share on other sites More sharing options...
phpknight Posted July 18, 2007 Share Posted July 18, 2007 For the first one: $theIP=$_SERVER['REMOTE_ADDR']; Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301065 Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 do i just need to add that code ? Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301068 Share on other sites More sharing options...
phpknight Posted July 18, 2007 Share Posted July 18, 2007 Well, you have to print it or whatever if you want to see it, but yeah, that's it! Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301070 Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 thanks, buddy... Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301071 Share on other sites More sharing options...
phpknight Posted July 18, 2007 Share Posted July 18, 2007 No problem. Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301072 Share on other sites More sharing options...
Asday Posted July 18, 2007 Share Posted July 18, 2007 ... i want the output above display text with gray background color...how ? You will need to drop out of php and do a bit of html. Like so: <body bgcolor="#CCCCCC" text="#000000"> <?php echo "wtf? colour! (Of a sort...)"; ?> </body> Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301073 Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 i don't want the page background color...i want the text to have a background color, in other words text highlight... Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301099 Share on other sites More sharing options...
Asday Posted July 18, 2007 Share Posted July 18, 2007 i don't want the page background color...i want the text to have a background color, in other words text highlight... Plech. Give me a moment. <span style="background-color:#CCCCCC;"> <?php echo "This is another paragraph"; ?> </span> Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301117 Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 thanks... Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301138 Share on other sites More sharing options...
Asday Posted July 18, 2007 Share Posted July 18, 2007 thanks... Why the dots? Link to comment https://forums.phpfreaks.com/topic/60520-solved-actually-two-things-ip-address-and-adding-style-in-php/#findComment-301177 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.