Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jun 2005
    Posts
    4
    Member #
    10327
    Hey

    I have the following basic script:

    Code:
     <?php
    include("connect.php");
    $result = mysql_query("select * from music where kategori like '%bb%'") or
    die (mysql_error());
    while ($row = mysql_fetch_array($result))
    {
    echo $row["tittel"];
    echo $row["utgivelse"];
    echo $row["besetning"];
    echo $row["utgiver"];
    echo $row["durata"];
    echo "<br>\n";
    echo $row["kort_beskrivelse"];
    
    }
    mysql_free_result($result);
    ?>
    In the music table I also have a field called "url_beskrivelse". In this field there is an URL. What I want to achieve is to make the "tittel" use this as a url, so something similar to this:

    <a href="$url_beskrivelse" >$tittel</a>

    Would this be possible to manage?

    Thanks a lot for any help! .. I really need some!

  2.  

  3. #2
    Junior Member
    Join Date
    Jun 2005
    Posts
    4
    Member #
    10327
    Oh, nevermind, here's something that actually works:

    echo "<a href=\"".$row["url_beskrivelse"]."\">".$row["tittel"]."</a>";


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

a href in sql

,

a href sql

,

href by sql

,

php output href from sql query

,

sql href

Click on a term to search for related topics.
All times are GMT -6. The time now is 10:57 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com