473,396 Members | 1,765 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.hostaddress.com", "username", "password") or die(mysql_error());
mysql_select_db("support") or die(mysql_error());

//Retrieves data from MySQL
$data = mysql_query("SELECT * FROM profiles WHERE type_name = 'Patrons'") or die(mysql_error());
//Puts it into an array
while($info = mysql_fetch_array( $data ))
{
$text = $info['profile_detail'];
//Outputs the image and other data
Echo "<table width=100% class=table2><tr><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>Profile:</b><b> ".$info['profile_name'] . "</b></td></tr><tr><td valign=top>".ShortenProfile($text)."</td>
<td valign=bottom><a href=patrons_details.php?recordID=".$info['id'] . " class=nav4>+More</a></td></tr></table>";


}
?> </td>
</tr>
<tr>
<td align="right" valign="top" class="nav4"><a href="patrons_details.php?recordID=<?php echo $row_recordsetName['fieldName']; ?>" class="nav4">+More</a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="right" valign="top"><a href="#" class="nav4">Make Comment</a> | <a href="#" class="nav4">Submit Article</a> | <a href="#" class="nav4">Contact Us</a> </td>
</tr>
</table>

================================================== ==
Nov 15 '06 #1
3 1547
ronverdonk
4,258 Expert 4TB
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:
Nov 15 '06 #2
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("SELECT * FROM profiles WHERE type_name = 'Patrons'") or die(mysql_error());

//Puts it into an array
while($info = mysql_fetch_array( $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><tr><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_photo"

<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_name" AND ITS CALLS THE VARIABLE FOR THE FUNCTIONS THAT SHORTENS THE "profile_detail" DATABASE FIELD INFO WITH . ".ShortenProfile($text)."


Echo "<td valign=top colspan=2><b>Profile:</b><b> ".$info['profile_name'] . "</b></td></tr><tr><td valign=top>".ShortenProfile($text)."</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_DETAILS.PHP"

<td valign=bottom><a href=patrons_details.php?recordID=".$info['id'] . " class=nav4>+More</a></td></tr></table>";
}
?>

PROBLEM: NOW MY PROBLEM ISTHAT WHEN THIS PAGE OPENS MY "PATRONS_DETAILS.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_DETAILS.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.
Nov 15 '06 #3
ronverdonk
4,258 Expert 4TB
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:
Nov 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark ??;-\) | last post by:
I would like to display a listing of files on a web page as follows: If there is only one file: display the section name and then display the current file. If there is more than one file (for...
2
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
8
by: Jon Weston | last post by:
I'm setting up an Access2003 database with pictures. I put a bound ole picture ctrl on a form that's source is the table that contains the pictures and follow ALL the directions for embedding a...
20
by: Tim Reynolds | last post by:
Team, I am developing a web service. In testing in on my enw PC, I am expecting to see exceptions thrown appear on my browser. Instead I am getting an HTTP 500 Internal Server Error page and I am...
8
by: Lloyd Sheen | last post by:
I have a list of JPG's which are found in a SQL Server database. When the page selects a certain piece of data it will refer to the file system (resident on IIS server with a virtual directory)...
8
by: bimeldip | last post by:
Hi, i would like to display the list of tables in a database in a drop down list then when user selects a table, the table will be dispalyed on the page. So far i've done this: <? $dbname =...
2
by: trysenthil | last post by:
hi all., i want a query from u.,which must display me like this., is displaying me., 07-september-2007
3
by: mikec87 | last post by:
I am very new with PHP...started doing this a few days ago to help someone and I need some help please. I have a webpage that is not displaying the records I want it to. The sql is correct, and I...
1
by: ajos | last post by:
This may be very dumb question, but still...I am displaying a value in a input tag with the value shown as readonly... <input type=text size=18 maxlength=50 name="company" value=<%=companyCode %>...
11
by: dba | last post by:
Have been displaying data from database using html for some time but just recently trying to display data back to "form". Can't find answer. <form method="post" action="<?php echo $PHP_SELF;?>">...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.