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 ? Quote Link to comment 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']; Quote Link to comment 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 ? Quote Link to comment 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! Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 thanks, buddy... Quote Link to comment Share on other sites More sharing options...
phpknight Posted July 18, 2007 Share Posted July 18, 2007 No problem. Quote Link to comment 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> Quote Link to comment 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... Quote Link to comment 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> Quote Link to comment Share on other sites More sharing options...
jd2007 Posted July 18, 2007 Author Share Posted July 18, 2007 thanks... Quote Link to comment Share on other sites More sharing options...
Asday Posted July 18, 2007 Share Posted July 18, 2007 thanks... Why the dots? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.