#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    London, England
    Posts
    64
    Rep Power
    15
    I pull a string out of MySQL and display it in an html page using PHP. It automatically becomes a hyperlink but if it is a link to a document (www.web.com/test.doc) it won't translate it into a hyperlink. Does anybody know how I might do this?

    Thanks in advance for any suggestions.

    Gareth.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    It automatically becomes a hyperlink but if it is a link to a document (www.web.com/test.doc) it won't translate it into a hyperlink.


    show me how you are doing this...


    any way,just try the following:

    <?php


    $result=mysql_query("select docname from tblname where somefield='value'",$con);
    // select query

    $row=mysql_fetch_array($result);
    //return rows


    echo "<a href=".$row[0]."> Your document</a>n";

    // print the document name inside anchor element.

    ?>




    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. offset limit hyperlink
    By tragnark in forum PHP Development
    Replies: 2
    Last Post: February 10th, 2004, 04:19 PM
  2. Replies: 2
    Last Post: February 6th, 2004, 06:46 AM
  3. displaying first post as different style woes
    By turnah in forum PHP Development
    Replies: 11
    Last Post: April 16th, 2003, 10:34 AM
  4. Tooltips or hyperlink to another page
    By siric in forum PHP Development
    Replies: 5
    Last Post: December 6th, 2002, 10:31 AM
  5. How to access hyperlink hover attributes using Javascript ?
    By sk8ertim in forum JavaScript Development
    Replies: 6
    Last Post: May 31st, 2001, 10:50 AM

IMN logo majestic logo threadwatch logo seochat tools logo