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 3 of 3

Thread: Link to content

  1. #1
    p@p
    p@p is offline
    New Coder
    Join Date
    Apr 2010
    Location
    Indonesia
    Posts
    71
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Link to content

    Hello I have a problems with link the content, the content is stored into mysql database.

    The field in database is id, headline and content.
    I only can do listing the id and headline using fetch array, and my problems is how to linking that''s id and headline when user click that's link it's retrieving the details about the id:
    For example:

    PHP Code:
    <?php
    // Make a MySQL Connection
    require_once('db.php'); 
    $query "SELECT * FROM lirik WHERE id"
    $result mysql_query($query) or die(mysql_error());
    $row mysql_fetch_array($result) or die(mysql_error());
    echo 
    $row['id']. " - "$row['title']. " - "$row['dt'];
    ?>
    That's the php script what i used for received id and headline.

    My question is:
    1. How to make a link when the user click the link it's a details about id, headline and content?


    Thanks for people help me

  • #2
    New Coder
    Join Date
    Nov 2010
    Posts
    15
    Thanks
    0
    Thanked 1 Time in 1 Post
    No offense, but I think there is a communication gap here because of your English. We'll try and help you, but I'm not exactly sure what you want.

    Are you saying that you want a link that fetches information about a certain row in the database ? If so, there are a few more things you need.

    One, either you must find a way to dynamically set a link for each row in the table.

    Then, when the user clicks a specific link, have the id included in the URL, something like:

    http://mypage.com/index.php?id=IDHere

    Have a switch for ID setup to GET the value of ID, query the database for the content and the headline for that ID, and echo the values onto the page in whatever format you need.

  • #3
    p@p
    p@p is offline
    New Coder
    Join Date
    Apr 2010
    Location
    Indonesia
    Posts
    71
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by syncupsolutions View Post
    No offense, but I think there is a communication gap here because of your English. We'll try and help you, but I'm not exactly sure what you want.

    Are you saying that you want a link that fetches information about a certain row in the database ? If so, there are a few more things you need.

    One, either you must find a way to dynamically set a link for each row in the table.

    Then, when the user clicks a specific link, have the id included in the URL, something like:

    http://mypage.com/index.php?id=IDHere

    Have a switch for ID setup to GET the value of ID, query the database for the content and the headline for that ID, and echo the values onto the page in whatever format you need.
    Yes it is Sorry my english very bad i knew it


  •  

    Posting Permissions

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