I am trying to build a site that allows people to sign up as members. The members then get a copy of the website, but with all their own information on it, to advertise to others. I do not know how to make it self replicate.
I have a MySQL database that I can add feilds to put the info into and have PHP draw from it, if needed.
Here's an example of what I mean:
http://www.mysite.com //this is my main domain (ex.)
MySQL DB
Table
memid--username--fname--lname--email------------------(site info)
1 scruffy Mark Smith msmith@msn.com (misc info)
The site info field could be a set of fields that diplay the info needed.
http://www.mysite.com?memid=1
The first link should display the host site. The second link should display the host site, but it should make changes according to Mark Smith's information.
Then I need that information to travel with any new user who Mark referred to the site as long as they remain in the site. So when they click links to read stuff, to sign up, etc, it should always stay Marks site that they see.
One last thing, When a new user tries to sign up from Mark's site, in the registration form is a field that displays the sponsor's memid number. How do I get that to automatically insert the correct memid in that field so that the user doesn't have to, also so that the user cannot remove or change it.
Thank you for any help on this.
Help with replicating Websites
Moderator: General Moderators
Wow, I must say that I am amazed. This is some forum. All these people here and not one of them knows how to do this. Is PHP that hard to use that none of you have figured this out? I'm no genius. I've only been using PHP for a month. No, I don't know how to do this, but surely, one of you has enough experience to be able to tell me how. I'm not asking you to do it for me, I just want some explaination as to how to do it.
Aren't we here to help each other? I know that once I learn how to do this stuff, then I will definitely help others, as that is the best way for an intermediary to become an expert.
Aren't we here to help each other? I know that once I learn how to do this stuff, then I will definitely help others, as that is the best way for an intermediary to become an expert.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
For tracking a user - using sessions or cookies could be what you are looking for. That way you can store the memid in a session variable or in a cookie so that you can just reference that each time a new page is loaded.
http://www.php.net/manual/en/ref.session.php
http://www.php.net/manual/en/function.setcookie.php
For autogenerating a member's id use an AUTO_INCREMENT field - that way it will be automatically assigned. To stop them changing it you need to make sure that you don't give them the capability.
One thing I'm really not clear on is whether you need to give your members a generated set of files that they can upload elsewhere or whether those pages will exist as part of your site.
Mac
P.S. We are all volunteers here and sometimes questions get overlooked, often it is because they are confusing or seem very complicated. Being sarky won't make people help you faster and people aren't ignoring your question on purpose.
http://www.php.net/manual/en/ref.session.php
http://www.php.net/manual/en/function.setcookie.php
For autogenerating a member's id use an AUTO_INCREMENT field - that way it will be automatically assigned. To stop them changing it you need to make sure that you don't give them the capability.
One thing I'm really not clear on is whether you need to give your members a generated set of files that they can upload elsewhere or whether those pages will exist as part of your site.
Mac
P.S. We are all volunteers here and sometimes questions get overlooked, often it is because they are confusing or seem very complicated. Being sarky won't make people help you faster and people aren't ignoring your question on purpose.
Thank you for your quick answer to this. I don't mean to offend, but this thing is really frustrating me because I see it done all over the internet, but I can't get anyone to tell me how they do it.
I want people to gain credit for referring new members to my site. How do I set up my site so that a member will gain credit for referrals?
I want people to gain credit for referring new members to my site. How do I set up my site so that a member will gain credit for referrals?
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
What tends to happen is you have an id for each referrer and when someone comes to your site from theirs you cookie them with a cookie containing that id (or use sessions) and then when they come to buy from you or join your site you check for the existance of the cookie or session variable and credit the person who referred them.
Basically you need to get to be able to store a variable that will persist no matter where someone goes in your site - a cookie would probably be easiest.
Mac
Basically you need to get to be able to store a variable that will persist no matter where someone goes in your site - a cookie would probably be easiest.
Mac