How to fix my link problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simon2x1
    New Member
    • Dec 2008
    • 123

    How to fix my link problem

    when i test the code below on my localhost it will display the name of the url which i select from my database but while online when move my mouse to the link it will display my domain name and the link eg http//:mydomainname.c om/www.thelink.com how can i fix these.

    Code:
    $result = @mysql_query("SELECT * FROM user");
    $line = mysql_fetch_array($result);
    $dweb = $line[web];
    $dbuz = $line[title];
    
    echo"<a href= '$dweb' target = '_blank'>$dbuz</a>";
  • chazzy69
    New Member
    • Sep 2007
    • 196

    #2
    My guess would be one of two things; First check that the url that you stored in your mysql database/table is correct, if so just try to echo $dweb by itself and see what outputs. The other thing that may be wrong is when writing urls make sure you use 'http://www.thelink.com ' not just 'www.thelink.co m' otherwise it won't point outside of your current domain.

    Comment

    Working...