Forum Moderators: coopster

Message Too Old, No Replies

Controlling multiple accounts

client has the ability to create multiple accounts

         

togethercomms

3:12 pm on Sep 18, 2009 (gmt 0)

10+ Year Member



Hi,

I am developing a website that my client can upload specific data to a client and that cient can log in and view that specific data.

Also this website has a messenger feature that allows the client to contact the owner if their is a problem or for general chit chat.

I was wondering what is the best way to go about doing this?
This will incorporate my client adding and deleting accounts, uploading massive amounts of data (client specific)

I need to know if their is a quick and easy way to do this as i have a week to create the client side website and them create all the administrative features.

I am using PHP (obviously) and MySQL.

Many Thanks

impact

4:10 pm on Sep 18, 2009 (gmt 0)

10+ Year Member



Hi,
I am not good in php concepts but still i will try to answer a part of your question.

Since you are using mysql, you can store owner's data into a table along with receipts code (name/number/or some thing). Each time a member logs in your script will check through the table to see if there is any thing for the user else he has no message. You can use a separate column to store date. You can use the date to reference each owner's post as old post or new post.

Hope this helps.

andrewsmd

4:16 pm on Sep 18, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One week, ha good luck. That's all I have.

togethercomms

4:16 pm on Sep 18, 2009 (gmt 0)

10+ Year Member



thanks, i know i can get mysql to add tables for a user but can i get it to add multiple tables, as i would need a table for the messaging system and any reports that are uploaded for their view and get just one3 php page to collect the data for that user based on their username.

I know that after you enter a username and password that you can pass the username on through the site and mysql will use that to collect all the data needed for the website for that specific user.

Appologies if i am going around the hoouses on this one.

Many Thanks

impact

12:38 am on Sep 19, 2009 (gmt 0)

10+ Year Member



Well, Actually, you dont need to create a table for each user. What I think you should do is to have a table for messages.

Lets say, you have a table for all your user. That is some thing like this.
Table name "userdata" which stores your user's login Id and password and may be users name, age, sex, second email, forgot password question and so on.

Now create another table "userMessage". Have "userID/userEmail", "messageText", "messageStatus" as the fields in your table.

Always make the owner, chose a particular/or many client. As the owner saves the message. Open userMessage table, find out userID/userEmail of each clients who have been selected by the owner and append the values into userMessage table AND SET messageStatus as 1.

When a user logs in, your scripts should search through the userMessage table to check if there is any messages for this user, if yes, is it messageStatus 0 or 1 ?. If it is 0 then its a old message. If it is 1 then it a new message. Update that message which has statusMessage as 1 to 0 and display the new message to the user.

Hope this helps.

togethercomms

1:08 pm on Sep 21, 2009 (gmt 0)

10+ Year Member



great, is it possible that when a user enters their username and password that the username is carried over to the next page and is able to be put in a variable?

The reason for this is that all the content on the website is picked from the database using the username as the main vaiable.

Many Thanks

impact

2:41 pm on Sep 21, 2009 (gmt 0)

10+ Year Member



Oh yes, very easy. Use a text box within a form submission to a particular php page and in that php page get the text box value.

You can also save values in cookies or in session. which you can retrieve at any point of time from any web page in your site.

togethercomms

2:44 pm on Sep 21, 2009 (gmt 0)

10+ Year Member



how do i got that, i have in the past carried the value in the address bar but this is not the ideal solution for this website

togethercomms

4:06 pm on Sep 21, 2009 (gmt 0)

10+ Year Member



i am trying to use the username as the main point of reference for my website, with the username it will call all the data with that username onto the webpage.

What i am trying to do is create a site that has specific information for different users, i used (once) the $_GET command and it passed the information successfully but i was wondering if their is an easier and quicker way to do this, as the $_GET isn't working for me right now and i cannot figure out why, mainly because it is the same that i used before and i know it workd, but will not work on this project.

Many Thanks

impact

7:59 am on Sep 22, 2009 (gmt 0)

10+ Year Member



you can use $_request works as both $_get and $_set.

Here a good site to learn php in more detail [w3schools.com...]

togethercomms

10:04 am on Sep 22, 2009 (gmt 0)

10+ Year Member



thats greaqt i have managed to do it, thatnks for the link impact really helpful, good website aswel.

Just wondering can you select data from 3 tables?
I've seen tuts for selecting data from 2 tables which i have done but im not sure if you can do it with more than 2.

Many Thanks

togethercomms

2:12 pm on Sep 29, 2009 (gmt 0)

10+ Year Member



I would like to say to "Andrewsmd"

That i finished the full custom built CMS system with uploads and login forms for different users within a week from scratch.

Many Thanks to everyone that helped

impact

3:23 pm on Sep 29, 2009 (gmt 0)

10+ Year Member



No problem.