Display the records as links

Discussion in 'PHP' started by parusa619, Oct 3, 2006.

  1. #1
    Hello everyone!!! how can I display my records as links in PHP? As of now I want to practice making E-commerce websites
     
    parusa619, Oct 3, 2006 IP
  2. rb3m

    rb3m Peon

    Messages:
    192
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $url = $result["url"];
    $linktext = $result["linktext"];
    echo "<a href=\"$url\">$linktext</a>";

    Of course, in your database you should have the fields url and linktext and previously have selected some information from it in your php script.
     
    rb3m, Oct 3, 2006 IP