| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: Florida
Posts: 233
![]() | 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 ????: NamePros.com http://www.namepros.com/programming/499905-php-login-upload-html.html 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 |
| |
| | #2 (permalink) |
| Senior Member Join Date: Jul 2005 Location: NJ
Posts: 1,219
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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.
__________________ Hacksar.com - Your source for random computer tips and tricks! MySiteMemberships.com - Keep track of your site registration information! Like my post? Rep is appreciated! |
| |
| | #3 (permalink) |
| NamePros Legend Join Date: Dec 2005 Location: Philippines - www.Nabaza.com
Posts: 19,785
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | 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 |
| |
| | THREAD STARTER #4 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: Florida
Posts: 233
![]() | thanks for the tips!
__________________ www.headlinercreative.com |
| |
| | #5 (permalink) |
| New Member Join Date: Jul 2008
Posts: 6
![]() | 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. ????: NamePros.com http://www.namepros.com/showthread.php?t=499905 If you need any further help I'll be glad to do so. |
| |
| | #6 (permalink) |
| NamePros Member Join Date: Aug 2008 Location: Bristol
Posts: 42
![]() | 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? |
| |