The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled PHP Code
Posted by: Jake | January 19, 2009 @ 9:08pm
PHP Code
[
Download
]
<?php include "opendb.php"; $sql = "SELECT * FROM tbl_Files "; $sql .= "ORDER BY filename ASC"; $result = mysql_query($sql, $db); $rows = mysql_num_rows($result); echo "<table border='1'>\n"; echo " <tr>\n"; echo " <td>Filename:</td>\n"; echo " <td>Type:</td>\n"; echo " <td>Size:</td>\n"; echo " <td>Description:</td>\n"; echo " <td>Download Link:</td>\n"; for ($i = 0; $i < $rows; $i++) { $data = mysql_fetch_object($result); // since our script is very small, i'm not going to escape out to html mode here echo " <tr>\n"; echo " <td>$data->filename</td>\n"; echo " <td>$data->filetype</td>\n"; echo " <td>$data->filesize</td>\n"; echo " <td>" . stripslashes($data->description) . "</td>\n"; echo " <td> <a href='download.php?id=$data->id_files'>Click to Download</a> </td>\n"; echo " </tr>\n"; } mysql_free_result($result); mysql_close($db); ?>
Syntax Highlighting
[
Open in new window
]
Author Comments
This is the
Rating
4.67 / 8
243 Votes
http://codebin.yi.org/218
page generated in 0.00 seconds