[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 08-03-2008, 07:26 PM   #1 (permalink)
NamePros Regular
 
Join Date: Jul 2005
Location: Florida
Posts: 232
349.00 NP$ (Donate)

TeviH is an unknown quantity at this point


PHP login - upload - html

Hello,

As an ultra-simple CMS, I would like to allow someone to upload PDF documents to their website. The only thing they would like to do which would require updates is to upload these documents every few months or so, so I thought it would be overkill to implement a Drupal installation.

I found this: http://www.w3schools.com/PHP/php_file_upload.asp

There are a few things with that which don't address certain things I need. They are:
1. I need to have it login-based: let someone enter a username and password to get to the upload page
2. I want them to be able to enter a title and description of the document
3. And then the information would be displayed on a page

I'm a complete newb with php. Can anyone please point me in the direction I need to go?

Thank you so much!!
__________________
www.headlinercreative.com
TeviH is offline  
Old 08-03-2008, 08:14 PM   #2 (permalink)
Senior Member
 
nasaboy007's Avatar
 
Join Date: Jul 2005
Location: NJ
Posts: 1,112
1,454.30 NP$ (Donate)

nasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud ofnasaboy007 has much to be proud of


you could probabyl just as easy find a simple authorization script and implement it for the upload page. or, you can just use cpanel and password it from there.

to be able to add titles/descriptions, look up form handling. you'll probably be using the $_POST variables.

displaying the information would probably mean retrieving it from an mysql database.

look up some data on mysql for both storing and retrieving the data you want.
nasaboy007 is offline  
Old 08-03-2008, 08:18 PM   #3 (permalink)
NamePros Legend
 
weblord's Avatar
 
Join Date: Dec 2005
Location: Philippines - www.Nabaza.com
Posts: 19,840
21,700.43 NP$ (Donate)

weblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatnessweblord Has achieved greatness

Autism Protect Our Planet
for users to login use this
http://www.phpdeadlock.org/

for the file upload with such enhancements you may browse these lists
http://www.hotscripts.com/PHP/Script...ems/index.html
weblord is offline  
Old 08-04-2008, 11:39 AM   #4 (permalink)
NamePros Regular
 
Join Date: Jul 2005
Location: Florida
Posts: 232
349.00 NP$ (Donate)

TeviH is an unknown quantity at this point


thanks for the tips!
__________________
www.headlinercreative.com
TeviH is offline  
Old 08-13-2008, 06:28 PM   #5 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 5
10.00 NP$ (Donate)

joshma is an unknown quantity at this point


If your user isn't picky, you could protect the form using a .htaccess file instead. It doesn't require any additional PHP scripts, and the required files can be made easily at http://tools.dynamicdrive.com/password/.

As for file uploading, the w3school.com tutorial should suffice - add additional fields for the title and description, making sure you specify the name and id. As for connecting to the database, the w3school.com tutorial does a nice job as well - http://www.w3schools.com/PHP/php_mysql_intro.asp.

If you need any further help I'll be glad to do so.
joshma is offline  
Old 08-19-2008, 08:58 AM   #6 (permalink)
NamePros Member
 
fatratstew's Avatar
 
Join Date: Aug 2008
Location: Bristol
Posts: 42
0.00 NP$ (Donate)

fatratstew is an unknown quantity at this point


You will need to research each specific function and implement them accordingly. If you learn it rather than cop+pasting a script, it will make your life easier in the long run.
__________________
Why not learn PHP today?
fatratstew is offline  
Closed Thread


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

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 02:42 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85