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 Coder
    Join Date
    Jul 2011
    Location
    Pennsylvania
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help to display data from DB as hyperlink

    I have a database containing information on customers of ours. I have a code to display all the names of our customers as well.

    PHP Code:
    <?php
    mysql_connect 
    ("localhost""bail_admin""REMOVED") or die ('Could not connect to the MySQL Database because : ' mysql_error());
    mysql_select_db ("bail_bail") or die(mysql_error());
    $query mysql_query ("SELECT fname FROM bailfiles") or die(mysql_error());
    while (
    $row mysql_fetch_array($query))  

    {

    echo 
    "<br />Name:".$row[fname];

    }
    ?>
    This code works fine, but I would like to make each name a hyperlink to a PHP file that will take the variable for "name" and display all the data surrounding the customer.

    I'm figuring the best way to do it would be to make a form that inputs the value of "name" to a code like "SELECT * FROM $name" and have them echoed.

    Only problem is I am unable to figure out how to make this input form into a hyperlink. I don't even know if that is possible.

    Any advice?

  • #2
    New Coder
    Join Date
    Jul 2011
    Location
    Pennsylvania
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Could I possibly use the GET method and do it all via URL?


  •  

    Posting Permissions

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