Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    14

    Unanswered: Displaying the results of a query.

    Hi, i have a search page, where a user can enter what they require. A query is then carried out on the database from this information. The results are then displayed using the code below.

    What i would like to do is, have another column at the end of the table where the user can click a link in that column for that row and a page will open up with the information from that row displayed in an attractive format.

    // Search info from the Database.
    $result = mysql_query("$query")
    or die("SELECT Error: ".mysql_error());

    // Displays results in a table.
    $num_rows = mysql_num_rows($result);
    print "Number of Property's matching search: $num_rows<P>";
    print "<table width=200 border=2>\n";
    while ($get_info = mysql_fetch_row($result)){
    print "<tr>\n";

    foreach ($get_info as $field)
    print "\t<td><font face=arial size=1/>$field</font></td>\n";

    print "</tr>\n";
    }
    print "</table>\n";
    ?>

    Many thanks

  2. #2
    Join Date
    Jan 2005
    Posts
    362

    function

    Reading just the first paragraph - Why you do not write a .php file that takes the id of the column and display (at a new window- or not) the result?

Posting Permissions

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