I’m creating a flash based site for a motion graphics company. They would like to have a “client section” where clients can be given a username and password and could view videos clips that have been uploaded for them.
The client section would be built with php/mysql.
I’m having a hard time getting down what steps I need to take, it should go something like this:
my client should be able to create a new username/password for their client, let’s say (companyXYZ) through a web based form.
Once, they created a username for companyXYZ my client should be able to access an uploader that will allow them to select video files (or image/text files) and then set them to upload so that just “companyXYZ” can see them.
Then when “companyXYZ” goes to the client section and logs on, they’ll be able to view the uploaded content.
I have been able to read and write to a mySQL server before and I’m semi familiar with everything I have to do, but I just have a hard time setting it up so that a user goes to their own page and that the uploaded content goes only to them. ANY help is appreciated. If possible a link to a tutorial or resource would be great.
cool. yeah that’s what I figured. I’m just having a hard time of picking a starting point. I’m going to start with the name/password creation. If anyone has a tutorial on how to give a user their own “space” please link me.
I should be starting this in a week or so, I’ll post my progress (if any).
Oh, I don’t know if this was clear, but this won’t be done in flash, that makes for uploading a lot easier.
Some good tutorials there. I’d write some custom functions that you can read and write from the database with, and then use those functions to do whatever you need to read or write from the database. Look into custom functions.
You don’t need a whole lot for something like this. You can keep it pretty simple. From what I understand your client needs to be able to add a user (their client) so that they can log in and view materials. Those materials will be uploaded by your client.
Here’s what I’d do…
Create the space for your client that allows them to add a new client. When they add the new client assign a unique ID for the new client. So XYZCompany may get the id number 1 if they’re the first client. The next client would get the id number 2 and so on. In your database you’re saving all the client information you want (Unique ID number, Co. Name, Address, Phone, etc.) in one table.
When your client logs in to upload materials, have then select which user they will want to upload materials for. Say you work with a drop down menu to select the company. The value for the select menu would be that unique id number you set for each company. Pass that along to the upload form and keep that as a hidden field. When the material is uploaded save the information that you need into a database table (for example’s sake we’ll call the table “materials”). In the “materials” table save the unique id number along with the material information (file name, path, etc).
Now when the client logs in (the company … or client’s of your client) you can save their unique ID into a session variable which gets used by your PHP code to determine which materials will be available to them. So the client with the unique ID 1 won’t see anything but materials associated with their ID number.
BTW - there’s more to consider with this system than just the above. For example editing and removing clients from the system, password changes, editing and removing materials, and so on. But the above what just a way to show you how to get started. Oh and a system like this is easily expandable to have multiple “projects” for clients as well.
Would you recommend a place to look for resource? I will be starting this next week sometime, I’ll work out as much as possible and try to keep you posted on my progress and maybe ask for advice in certain areas.
I’m also aware of a few 3rd party software packages that have this “project management” system set up, but my client wants it to be REALLY simple and they want it to work seemlessly with the site, if anybody has any ideas on existing software say 10-20$ a month, that may work too.
Ive created a system exactly like this. There is a back end for administration where a client can add users and assign them a username and password. Then, there is a list of available files for download that you can associate with the user. When the user logs in, it will list available files for them to view/download, and give stats on the last time they accessed/downloaded the file. It is a pretty simple PHP/MySQL setup you are after.
The basic MySQL table setup will consist of 4 tables (you can add more if you want to track logins, etc…): users, files, user_file, user_download
The PHP setup will have your login page for users (this page will also be used by your client), and a page to list and view files. The backend will have a few pages depending on how much information you put into it. Basically a create/edit user screens, associate files, etc…