Displaying Detailed Result

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Objectifnet
    New Member
    • Nov 2006
    • 7

    Displaying Detailed Result

    Helo, please is there anyone who can help out with this; I have a script that displays details from a MYSQL database and a File Server containing images.

    Here is the code below:

    My problem is: I want to display the details of $text = $info['profile_detail ']; in a details page but its not coming up at all. It just displays an empty page. I have set the page record set. but it still not working.

    =============== =============== =============== ===

    <table width="100%" border="0" cellpadding="5" cellspacing="0" class="table2">


    <tr valign="top">
    <td><table width="100%">
    <tr>
    <td align="left" valign="top">
    <?php
    // Connects to your Database
    //mysql_connect(" your.hostaddres s.com", "username", "password") or die(mysql_error ());
    mysql_select_db ("support") or die(mysql_error ());

    //Retrieves data from MySQL
    $data = mysql_query("SE LECT * FROM profiles WHERE type_name = 'Patrons'") or die(mysql_error ());
    //Puts it into an array
    while($info = mysql_fetch_arr ay( $data ))
    {
    $text = $info['profile_detail '];
    //Outputs the image and other data
    Echo "<table width=100% class=table2><t r><td valign=top rowspan=2><img src=C:/Inetpub/wwwroot/sites/supportbridges/www/profile/".$info['profile_photo'] ."></td>";
    Echo "<td valign=top colspan=2><b>Pr ofile:</b><b> ".$info['profile_name'] . "</b></td></tr><tr><td valign=top>".Sh ortenProfile($t ext)."</td>
    <td valign=bottom>< a href=patrons_de tails.php?recor dID=".$info['id'] . " class=nav4>+Mor e</a></td></tr></table>";


    }
    ?> </td>
    </tr>
    <tr>
    <td align="right" valign="top" class="nav4"><a href="patrons_d etails.php?reco rdID=<?php echo $row_recordsetN ame['fieldName']; ?>" class="nav4">+M ore</a></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td align="right" valign="top"><a href="#" class="nav4">Ma ke Comment</a> | <a href="#" class="nav4">Su bmit Article</a> | <a href="#" class="nav4">Co ntact Us</a> </td>
    </tr>
    </table>

    =============== =============== =============== =======
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Read the Posting Guidelines at the top of this forum!!
    And enclose your code in php, code or html tags, as stated.


    After that we may have a look at your code.

    Ronald :cool:

    Comment

    • Objectifnet
      New Member
      • Nov 2006
      • 7

      #3
      Thanks Ronald, I am much relieved knowing that someone has seen my post and is willing to help. Thanks a lot.

      Back to the post, What I reaaly want to do is to be able to link two pages together using an ID, The table involved displays an image stored on the File Server but with its details in the Database called "Support" an a Table Called "profiles": My code again is:

      PHP:
      /* I used this code to select a Database to use*/
      mysql_select_db ("support") or die(mysql_error ());


      //I used this tp Retrieves data from MySQL Table
      $data = mysql_query("SE LECT * FROM profiles WHERE type_name = 'Patrons'") or die(mysql_error ());

      //Puts it into an array
      while($info = mysql_fetch_arr ay( $data ))

      // This variable calls a function that I use to shorten the output of the string displayed by the Database Table field called: 'profile_detail '
      $text = $info['profile_detail '];


      CODE:
      //ThIS PORTION OF HTML AND PHP CODES OUTPUT THE IMAGE AND OTHER DATA FROM THE TABLE "profiles"

      Echo "<table width=100% class=table2><t r><td valign=top rowspan=2>

      CODE:

      FILE SERVER LOCATION OF THE IMAGE TO BE DISPLAYED WITH THE DATABASE FIELD STORING THE IMAGE INFO CALLED "profile_ph oto"

      <img src=C:/Inetpub/wwwroot/sites/supportbridges/www/profile/".$info['profile_photo'] ."></td>";

      CODE:

      THIS PORTION OF HTML AND PHP CODES DISPLAY THE DATABASE FIELD STORING THE PROFILE NAME CALLED "profile_na me" AND ITS CALLS THE VARIABLE FOR THE FUNCTIONS THAT SHORTENS THE "profile_detail " DATABASE FIELD INFO WITH . ".ShortenProfil e($text)."


      Echo "<td valign=top colspan=2><b>Pr ofile:</b><b> ".$info['profile_name'] . "</b></td></tr><tr><td valign=top>".Sh ortenProfile($t ext)."</td>

      CODE:

      THIS IS THE PROBLEM AREA. THIS PIECE OF CODE IS EXPECTED TO PASS THE RECORD ID OF THE PROFILE DISPLAYED BY THIS GIVEN ID "$info['id'] " TO A PAGE CALLED "PATRONS_DETAIL S.PHP"

      <td valign=bottom>< a href=patrons_de tails.php?recor dID=".$info['id'] . " class=nav4>+Mor e</a></td></tr></table>";
      }
      ?>

      PROBLEM: NOW MY PROBLEM ISTHAT WHEN THIS PAGE OPENS MY "PATRONS_DETAIL S.PHP' PAGE PASSING THE RECORDID WITH THE URL. THE PATRONS_DETAILS .PHP" PAGE DOES NOT DISPLAY THE DETAILED INFO. IT JUST SHOWS THE RECORDID IN THE URL BUT DISPLAYS A BLANK PAGE.

      THE RECORDSET FOR THE "RPATRONS_DETAI LS.PHP" PAGE IS CREATED WITH DREAMWEAVER.

      I HOPE THIS WILL HELP YOU BETTER IN APPRECIATING MY PROBLEM IF NOT, PLEASE LET ME KNOW.

      THANKS SO MUCH.

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        If you flatly refuse to follow the moderator request to follow some simple posting guidelines, I will have to close this thread for now.

        Ronald :cool:

        Comment

        Working...