Dynadot โ€” .com Registration $8.99

PHP login - upload - html

Spaceship Spaceship
Watch

TeviH

Established Member
Impact
2
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!! :D
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
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.
 
0
•••
0
•••
thanks for the tips!
 
0
•••
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.
 
0
•••
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.
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back