Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 14th, 2007, 2:12 PM   #1
TCStyle
Programmer
 
Join Date: Jan 2005
Location: Albany, NY
Posts: 43
Rep Power: 0 TCStyle is on a distinguished road
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...
TCStyle is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:06 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC