Hi there, I am trying to build a website with membership. But I do not know much about how to achieve it. Can someone please suggest me any good resources or tutorials for it? Also, how can make it like this: facebook.com/myprofilepage I mean when someone registered to the site, I want to give him a page like: mysite.com/newuser something like this. Any idea? Thank in advance! Of course, in PHP
Since your programming skills seem rather limited you have three options: 1. Learn programming 2. Hire a programmer 3. Install some community software such as SocialEngine or Wordpress + Buddypress
Membership systems are fairly easy to create, i would recommend you check out some video tutorials on PHP member base scripts. As for the profile thing, you can do that but you have to think, what if a use creates the same user name as a folder? Like has the user name called "Includes". You can easily do that with htaccess and PHP. Or, the other suggestion i have is that you have a page called "profile.php" then code the script so it would be positioned like his "profile.php?id=IDHERE". That is the easiest option for you. Thanks, Michael
Yes, I am still learning and I am thinking this project as a way to learn new things in PHP and improve my PHP skills. But thanks for your suggestions.
hi guys, i am looking to do this exact thing to make a staff/admin area and they have curtain privileges depending on who is logged in. how do you make a single page, such as profile.php see who is logged in, like you have put above? profile.php?id=IDHERE
I think you didn't get what profile.php?id=IDHERE should do. It should show profile of user with id IDHERE (1239125 for example) What are you asking for?
basically i need it to go to a 'profile' area when the user logs in. so if a staff member logs in it will only give them access to 'staff things' and admin only 'admin things', however just to make it a lil more complicated, i need individual logins too. so all in all it needs to have: different login details (usernames) for each user, and for each type of user to have access to only the info they should
you have to put access column in your users table and then check it something like $check = mysqli_query($connect, "SELECT access FROM users WHERE id = ".$_POST['uid']); if ($user_Access = mysqli_fetch($connect, $check)) { switch ($user_Access) { case "admin": header("Location:admin.php"); break; case "normall_user": header("location:profile.php"); break; } } PHP: so in this case, if that row in users table has access column value "admin", so it will redirect admin after logging to admin.php, if it is regular user, it redirects him to profile. Sorry If I made mistake within mysqli query, because I use only mysql
if you want to have profile like this mypage.com/G3n3s!s i would not suggest it. Better would be mypage.com/profile/G3n3s!s and you could do that by adding .htaccess file with this content RewriteEngine on RewriteRule profile/([0-9a-zA-Z-\/\,\.)+ profile.php?username=$1 Code (markup): and in profile.php you have to check $_GET['username'] BTW there is add_reputation button below my posts, please add it
however, be aware if you want to use it on public, hacckers could hack it easily with this method you have to learn something about security in php & MYsql queries, SQL injections & XSS attacks
it will be installed on a hosted server and will be put behind passwords galore!! no one will be able to access it without knowing the url anyway
no one needs url he can use something like myssite.com/profile/s' or 1 = 1 and it selects all users. It won't happen in this case but be aware, you really should read some articles about security. It will be Social Network ?
okay but in that case change admin.php to something like a65sd46as45fse6f45sd65f4s.php so no one can trace it
its not a way to learn anything on forum at beginner level because here everyone just give you an idea rather teach you....