Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlink data in my table

    Hey, i'm relatively new with MySQL so bare with me...

    I have a form on my website where users will input two fields, a websites name (e.g., Google) and a website url (e.g., https://www.google.com/)

    This form stores data in my database table "websites" with 3 columns(id, website, url)

    I'm looking to retrieve just the website names to show up on my page but have them linked to the url associated with them.

    The short story
    Users input 2 fields (website name and url)
    Which is stored in my db
    I want to recall the "website name" to my front end
    but have it linked to the given url.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,692
    Thanks
    25
    Thanked 657 Times in 656 Posts
    SELECT `url` FROM table WHERE `WEBSITE` = "website name";

    Of course when you store them you should check for duplicates
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

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