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: swat | January 11, 2009 @ 3:34am
PHP Code
[
Download
]
<html> <head> <title>SimCity 3D Exchange Index</title> <link rel="stylesheet" href="style.css" /> </head> <body> <?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>\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> </td>\n"; echo " </tr>\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?fileget=$data->id_files'>Download</a> )</td>\n"; echo " </tr>\n"; } mysql_free_result($result); mysql_close($db); ?> </body> </html>
Syntax Highlighting
[
Open in new window
]
Author Comments
moo
Rating
4.50 / 8
189 Votes
http://codebin.yi.org/209
page generated in 0.00 seconds