ip help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    GumSlone way is a better way of doing it, however here is another way:
    PHP Code:
    $uipadd mysql_fetch_array(mysql_query("SELECT ipadd FROM siteusers WHERE id='".$who."'"));
    $ip preg_split("/[,]+/"$uipadd[0]);
    echo 
    "<center><b>Ip:</b> <a href="lists.php?action=byip&amp;who=$who">$ip[0]</a></center>"

    However i think the real problem here is the mysql array is being edited by thunderwap to:
    PHP Code:
    $uipadd mysql_fetch_array(mysql_query("SELECT ipadd FROM siteusers WHERE id='".$who."'"));
    $arr explode(',',$uipadd); //returns the first object of the mysql array which is the dual ip address
    $ip $arr[0];

      echo 
    '<center><b>Ip:</b> <a href="lists.php?action=byip&amp;who='.$who.'">'.$ip.'</a></center>'
    (Original post says: $web=explode(",",$uipadd); )

    when it should be like this edited version:
    PHP Code:
    $uipadd mysql_fetch_array(mysql_query("SELECT ipadd FROM siteusers WHERE id='".$who."'"));
    $arr explode(',',$uipadd[0]); //The mysql array now has array index number :D (or could have stuck to gums original way with the array name)
    $ip $arr[0];

      echo 
    '<center><b>Ip:</b> <a href="lists.php?action=byip&amp;who='.$who.'">'.$ip.'</a></center>'

    Comment


      #17
      thank you so much something else and gumslone. it worked.
      sigpic

      WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

      Comment

      Working...
      X