Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Login & Upload Script


  • Please log in to reply
10 replies to this topic

#1 Teach Power

Teach Power

  • Members
  • 54 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:FL
  • Local time:10:41 AM

Posted 20 March 2010 - 03:54 PM

Hello all. I am the owner and website master of an education resource website and I have grown to the point where I want to grow a community around the website by adding a login/registration ability for new members AND an upload feature so members can add new educational material. The server that runs my website is Linux based.

I am familiar with some basic coding but I am unable to code my own login and upload scripts. I have researched and found some handy resources by I have no idea how to start or where to stick them in my website folder tree. Here are the two best links that I found for login and upload. In order to make sure I understand what I am doing and everything runs smoothly with its implementation, could you explain in simplified steps and terms? I promise my intelligence won't be offended... lol :thumbsup: .

Login Script
http://www.phpeasystep.com/workshopview.php?id=6

Upload Script link
http://www.w3schools.com/PHP/php_file_upload.asp

Could I get some help please? Thank you in advance.
-TeachPower
TeachPower.net founder
Education Resource Library for the classroom & boardroom

BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:41 AM

Posted 20 March 2010 - 10:56 PM

It is a bit hard to give advice when we do not know the capabilities of your server. Have you seen this post yet?

No matter what, you are going to have to learn a little about how things work on the Internet.

#3 Teach Power

Teach Power
  • Topic Starter

  • Members
  • 54 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:FL
  • Local time:10:41 AM

Posted 21 March 2010 - 04:25 PM

groovicus... just the person I was hoping to see my post and help me or give me a little push in the right direction :thumbsup: . To answer your question, yes I did see that post while researching before I wrote my post and was going to try that out. The reason why I haven't is I was hoping to be able to find out how to create a login feature and somehow link that to an upload feature all at once. The site I am trying to create this for is located in the bottom of my signature... TeachPower.net

What is it that you need to know about the capabilities of my host server? The reason I only put that it is Linux based is that I thought that was the only real determining factor in how the login and upload script was coded. What do you think of the two "tutorial" links I included? I am familiar as I said with some coding. Please help me get this completed.

Edited by Teach Power, 21 March 2010 - 04:27 PM.

-TeachPower
TeachPower.net founder
Education Resource Library for the classroom & boardroom

#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:41 AM

Posted 21 March 2010 - 06:20 PM

Well, ASP is problematic to run on a Linux platform, so the upload script will not work for you.

Uploading a file isn't anything too difficult. Part of it can be handled using HTML:
http://www.cs.tut.fi/~jkorpela/forms/file.html
Php can easily handle the server side stuff.
http://www.tizag.com/phpT/fileupload.php

As far as the login part, my tutorial covers exactly how to do that. You can combine the login function and upload in any way you wish.

#5 Teach Power

Teach Power
  • Topic Starter

  • Members
  • 54 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:FL
  • Local time:10:41 AM

Posted 21 March 2010 - 11:44 PM

groovicus... I definitely will give both those tuts a thorough look over and try my inexperienced hand at them.

The whole point of having users login (besides building a community) is to give them the ability to upload their own educational content [everything from Word docs to PowerPoint lessons, etc.] so they can add to the educational library at Teach Power and possibly create a little side income. Before I go through that long uploading tutorial you linked me, is there a way to modify the upload script so they can automatically add their content to the website page with all the info that is needed? Basically what I am asking is can users correctly change my website page by uploading their own content or do I have to manually retrieve from a "upload folder" then add it to my website every time someone uploads their educational material?

I don't know if you have visited my education site but the site I would like to have their content added to would be a page like this link.

Thanks again for the help. I hope with your help I can get this feature up and running soon :thumbsup: .
-TeachPower
TeachPower.net founder
Education Resource Library for the classroom & boardroom

#6 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:41 AM

Posted 22 March 2010 - 07:02 AM

Your PHP can do whatever you want it to do. The tutorial I linked to for uploading does the uploading only. You would create another script to actually alter the content of the website. Figure out what information needs to be included with the upload, and then get it to the server. Once it is at the server, then do what you need it to do. If I were you I would download something like Xampp so that you can write and test the code on your regular system before putting it on your production server.

I'm sorry I can't be more specific, but this is going to require a bit of work on your part to figure out how to incorporate these changes into your site, and how dynamic page creation works. Do some php tutorials. :thumbsup: It shouldn't take you too long to get a basic understanding.

#7 Teach Power

Teach Power
  • Topic Starter

  • Members
  • 54 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:FL
  • Local time:10:41 AM

Posted 23 March 2010 - 09:35 PM

I have been going through the w3schools lessons on PHPand SQL off and on for the past 2 years. I actually enjoy it but really haven't had the time to sit down and really give it a go. Wife, kids, job, etc. gets kind of crazy sometimes :thumbsup: On a difficulty scale of 1 to 10 how difficult do you think learning how to code what I am looking for considering that I do have some basic understanding of PHP and SQL coding? I would like to add the login and upload feature as soon as possible and looks like I might have to maybe pay somebody to code those features for me. I'll let you know how it goes.
-TeachPower
TeachPower.net founder
Education Resource Library for the classroom & boardroom

#8 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:41 AM

Posted 24 March 2010 - 08:00 AM

The upload part is about a 3. Leaning SQL is about a 5. A semi-experienced programmer can do the project in a couple of hours.

#9 Teach Power

Teach Power
  • Topic Starter

  • Members
  • 54 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:FL
  • Local time:10:41 AM

Posted 25 March 2010 - 08:46 AM

Well thanks for your honest scoring. I am invigorated with the 3 and 5. That means that it is possible for somebody like me to figure it out. I look forward to the challenge and will ask questions along the way if you don't mind. What I am looking for is a basic login and upload script that I can customize to my needs, while learning along the way how PHP and SQL "talks" to the server and user [if you get what I mean]. Here we goooooooo :thumbsup: .
-TeachPower
TeachPower.net founder
Education Resource Library for the classroom & boardroom

#10 Teach Power

Teach Power
  • Topic Starter

  • Members
  • 54 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:FL
  • Local time:10:41 AM

Posted 27 March 2010 - 03:41 PM

groovicus... I have one question. In my learning of PHP and SQL I am doing fine with seeing how to setup the login and registration form, databases for the member's info and uploading scripts. While I am learning this I am wondering how to marry the upload feature to the registration feature. How code it to allow only registered users to upload their lesson plans, presentations, etc.?
-TeachPower
TeachPower.net founder
Education Resource Library for the classroom & boardroom

#11 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:08:41 AM

Posted 27 March 2010 - 03:53 PM

You keep a table in your database of user and hashed passwords. When they come to your site, they log in. If the log in is successful, you set a cookie on their computer that says they are a valid user. When they want to upload a file, the server checks to see if they have a cookie set, and if they do then allow the upload. If they do not, then the process gets bypassed and instead they should be presented with the option to log in or register on the site.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users