solved, but when i open my view_files.php
Text
it doesn't show the file names.
This is my code, again: i dont know what could possibly be.
%26lt;?php # Script 12.9 - view_files.php
// This page displays the files uploaded to the server.
// Set the page title and include the HTML header.
$page_title = 'View Files';
include ('./includes/header.html');
require_once ('mysql_connect.php'); // Connect to the
database.
$first = TRUE; // Initialize the variable.
// Query the database.
$query = ''SELECT upload_id, file_name, ROUND(file_size/1024)
AS fs, description, DATE_FORMAT(date_entered, '%M %e, %Y') AS d
FROM uploads ORDER BY date_entered DESC'';
$result = mysql_query($query) or die(mysql_error());
// Display all the URLs.
while($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
// If this is the first record, create the table header.
if ($first) {
echo '%26lt;table border=''0'' width=''100%'' cellspacing=''3''
cellpadding=''3'' align=''center''%26gt;
%26lt;tr%26gt;
%26lt;td align=''left'' width=''20%''%26gt;%26lt;font size=''+1''%26gt;File
Name%26lt;/font%26gt;%26lt;/td%26gt;
%26lt;td align=''left'' width=''40%''%26gt;%26lt;font
size=''+1''%26gt;Description%26lt;/font%26gt;%26lt;/td%26gt;
%26lt;td align=''center'' width=''20%''%26gt;%26lt;font
size=''+1''%26gt;File Size%26lt;/font%26gt;%26lt;/td%26gt;
%26lt;td align=''left'' width=''20%''%26gt;%26lt;font
size=''+1''%26gt;Upload Date%26lt;/font%26gt;%26lt;/td%26gt;
%26lt;/tr%26gt;';
$first = FALSE; // One record has been returned.
} // End of $first IF.
// Display each record.
echo '' %26lt;tr%26gt;
%26lt;td align=\''left\''%26gt;%26lt;a
href=\''download_file.php?uid={$row['upload_id']}\''%26gt;{$row['file_name']}%26lt;/a%26gt;%26lt;/td%26gt;
%26lt;td align=\''left\''%26gt;'' .
stripslashes($row['description']) . ''%26lt;/td%26gt;
%26lt;td align\''center\''%26gt;{$row['fs']}kb%26lt;/td%26gt;
%26lt;td align=\''left\''%26gt;{$row['d']}%26lt;/td%26gt;
%26lt;/tr%26gt;\n'';
} // End of while loop.
// If no records were displayed...
if ($first) {
echo '%26lt;div align=''center''%26gt;There are currently no files
to be viewed.%26lt;/div%26gt;';
} else {
echo '%26lt;/table%26gt;'; // Close the table.
}
mysql_close(); // Close the database connection.
include ('./includes/footer.html');
?%26gt;
thanks so much for all the help supportview files
i have just noticed by going to by database table 'uploads'
that everything's there fine, but under there's nothing under 'file
name'.
Is this normal ??
txsview files
it is fixed. thank you so much. i had a '$' missing in my
add_file.php and i had to change my download_file.php from this:
$the_file = '../uploads/' . $uid;
to this:
$the_file = 'uploads/' . $uid;
Its nerve breaking sometimes dealing with this codes,
lol
Hi Luis,
If I may chime in and make a quick suggestion, Luis., mind
you? Por favor?
I didn't realize the content of your site is aimed for
specific adult audience. Please try to keep that in mind, for those
who are not familiar with your site, as I discovered just now and
didn't know... so be sure to make a note of it, so participants
will know right away or it might offend some of them, or not. It
somewhat offends me, but no big deal.
It would be nice if there is a simple warning or such
acknowledgement specifically intends for adult audience or
something. you know better than me or others.
Thanks and have a good one, Luis.
I am so sorry, it surely wasn't my intention to offend you .
You obviously must have typed my website just has the home domain
address right?
i did put my from splash page with a warning before entering
the page, but i will make sure that everytime i send a post here i
add a note with a warning.
Accept my apologies Deaf. You are a good guy, never would
offend you.
No worries, Luis.
No one is perfect. We all, as human beings, make mistakes or
forgot. So, no big deal, Luis.
But I know it might be of offending for some individuals out
there, though.
Cheers, Brian (also known as DWD)
oh, i understand completly mate, i just didnt thing that
anybody would actually go to me website .I respect everybody on
this matter and i'll make sure from now on that i warn people in
case.
Thanks again DWD
No comments:
Post a Comment