Hello, Please i need your help. I am designing a website for my class and we want it to be a social site. I have designed the registration page, the log-in page, the database and other necessary pages, but i dont know how to design the way each member profile page, which will allow the member to be able to edit his/her profile and for other to view it like people do in FACEBOOK, HI5 etc please it is my contribution to my class kindly help.
regards,
adsegzy
how do i design view and edit profile page for members?
Moderator: General Moderators
Re: how do i design view and edit profile page for members?
If you can already view users accounts and users can view and edit their accounts then it's as simple as decoration it I guess.
If your looking to actually create a profile page for each member you may need to use something like this:
Obviously modify it to your own liking. But basically this allows a user to see a page (if in array) so only allow a user to view the edit part of their profile page. The else part shows what the page will look like if the result doesn't match whats in the array, in other words other users. And the last else is for if nothing at all is entered just show (or direct) them to the main page or whatever.
Of course there is probably a much better way of doing this but I'm to lazy to investigate. I nhaven't done the login system on my site yet, I'm finishing up doing the menu and general configurations and site layout before I do that.
If your looking to actually create a profile page for each member you may need to use something like this:
Code: Select all
<?php
$page = $_GET['file'];
$pages = array('News', 'Forum', 'Gallery', 'Admin', 'Shoutbox');
if (!empty($page)) {
if(in_array($page,$pages)) {
include("modules/" . $page . "/index.php");
}
else {
include("modules/Error/notfound.php");
}
}
else {
include("modules/News/index.php");
}
?>Of course there is probably a much better way of doing this but I'm to lazy to investigate. I nhaven't done the login system on my site yet, I'm finishing up doing the menu and general configurations and site layout before I do that.