GiTMApostle Posted August 28, 2006 Share Posted August 28, 2006 Here's the thing. I do not know much about PHP but would like to learn. However I would like some help with a problem I am having..I would like to have an 'file upload' script where only I can upload files.. meaning have a user name and password. I would like the file type to be limited to files with the exstenion ".rep" and once they have been uploaded I would like them displayed in a table on the webpage with the information I uploaded them with, example of form information:Player 1Player 2MapDownloadIn the table I would like them to be downloadable from clicking on a link under the "Download" row. So to have them displayed there in order from oldest on the bottom and newest on the top would be great. I dont really care about having more than 1 page if it helps me get this done sooner.So could someone point me in the right direction? I'm killing myself over this :( Quote Link to comment Share on other sites More sharing options...
jvalarta Posted August 28, 2006 Share Posted August 28, 2006 That's a long wish list for not knowing PHP. I would suggest trying to find something off the shelf that you can tweak, maybe from hotscripts.com. I don't think you're going to get anyone here to give you chucks of pre-written code, tailor made to your request. Sorry. Quote Link to comment Share on other sites More sharing options...
radar Posted August 28, 2006 Share Posted August 28, 2006 Here is a sample upload script... [CODE]<table width = "500" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"><tr><form action="multiple_upload_ac.php" method="post" enctype="multipart/form-data" name="form1" id="form1"><td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"><tr><td><strong>Multiple Files Upload</strong></td></tr><tr><td>Select File: <input name="ufile[]" type="file" id="ufile[]" size="50" /></td></tr><tr><td>Select File: <input name="ufile[]" type="file" id="ufile[]" size="50" /></td></tr><tr><td>Select File: <input name="ufile[]" type="file" id="ufile[]" size="50" /></td></tr><tr><td align="center"><input type="submit" name="Submit" value="Upload" /></td></tr></table></td></form></tr></table>[/CODE]This is the form.. and next will be the processing part of it...[CODE]<?phpecho $HTTP_POST_FILES['ufile']['name'][0];echo "<br>";echo $HTTP_POST_FILES['ufile']['name'][1];echo "<br>";echo $HTTP_POST_FILES['ufile']['name'][2];echo "<br>";?>[/CODE]This is a simple way to do it... I haven't actually tested this code yet as I got it before I actually needed it.. You may have to throw some mysql queries into the second file to make the file location and name etc be entered into a database.. then on the output you would query the database again requesting the url of each download and parsing them out using something like thisecho "<a href=\"'$file'\">Download 1</a>";and it's really that simple.. as far as the login there are tons of login script examples which will also help you get familiar with php and mysql -- in fact in the tutorials section on this site i believe there is a login example.. if you cant find it let me know and i'll post one... Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 28, 2006 Share Posted August 28, 2006 Simplify your life. If you are the only person able to upload files and you want to restrict them to a particular type, then use FTP or your File Manager to move them to your site. You'll have that working in a minute - must faster then implementing some password protected file uploader script. Quote Link to comment Share on other sites More sharing options...
radar Posted August 28, 2006 Share Posted August 28, 2006 [quote author=AndyB link=topic=105879.msg423132#msg423132 date=1156732203]Simplify your life. If you are the only person able to upload files and you want to restrict them to a particular type, then use FTP or your File Manager to move them to your site. You'll have that working in a minute - must faster then implementing some password protected file uploader script.[/quote]I wish I could simplify my life.. Though with the project I am working on it's impossible to simplify it any more than I already have without using pre-made code... My tutorial site I'm coding everything -- forums included.. It's proving to be a pain in the ass but oh well thats okay... Working on the admin console right now --- plus i'm using a template engine that I ended up re-writing to make work and so yeah.. simplify my life seems impossible at this point.. though for this guy -- seems like a valid idea... Quote Link to comment Share on other sites More sharing options...
GiTMApostle Posted August 28, 2006 Author Share Posted August 28, 2006 Yeah; I can do the file upload via FTP easily but I would still like a page where the information (files) are displayed in a table.. Other then that it's cool. :D I also am not asking for people to write me anything because I know it takes alot of time, just wondering where to be pointed is all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.