![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Programmer
Join Date: Jan 2005
Location: Albany, NY
Posts: 43
Rep Power: 0
![]() |
Organizing my file upload system and BBS.. im lost.
http://tricitystyle.com/shout/
A quick overview of my situation: I want to make a user based file upload system. For each file uploaded (only .jpg are accepted), I want it to have it's "own page" with it's own comment system. Now, I already have the comment system scripted. Heres what that page looks like: <?
mysql_connect("...", "...", "...") or die(mysql_error());
mysql_select_db("...") or die(mysql_error());
$bbsId = $_GET['id'];
// part1
if (!ereg("^[0-9]+$", $bbsId)) {
die ("Invalid id!");
}
// part2
if ($bbsId == 1) {
echo "<img src='content/1.jpg' width='600' height='450'>";
} elseif ($bbsId == 2) {
echo "<img src='content/2.jpg' width='600' height='450'>";
} elseif ($bbsId == 3) {
echo "<img src='content/3.jpg' width='600' height='450'>";
} else {
die("Invalid id!");
}
// part3
echo "<table width='600' bgcolor='#000000'><tr><td align='center'><font color='#FFFFFF'><b>Comments:</b></font></td></tr></table>";
$result = mysql_query("SELECT * FROM BBS WHERE bbsId='" . $bbsId . "' ORDER BY postId DESC") or die(mysql_error());
while ($row = mysql_fetch_array($result)) {
echo "<font ><b>".$row['uName'].": </b></font><font color='" . $row['tColor'] . "'>" . wordwrap($row['uText'], 80, "<br />", 1) . "</font>";
echo "<hr align='center' width='600' />";
}
?>Now, this script gets an id, and only selects data from the column with that id (so that each file has it's own comment system). My problem: I want to add a file upload system. How can I integrate it with this script? How should I organize the file upload system? Sorry if I'm not being clear, but it's hard to communicate my problem.
__________________
meh... |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|