0

hi

if u login as a user into one site there we have to provide an option to create user define pages when the user is relogin he should get his own site instead of default site.

logged in users site with all CSS ,HTML Pages ,Menu bars etc.

what todo.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by praveen_dusari
0

i didn`t understand what u want to do.
if u want to create settings for user better use sessions. and check in every page u write
for example
for a login page

$qer="select * from tbl_admin  where user='".$_POST['username']."' and pwd='".$_POST['password']."'";
    $res=mysql_query($qer)or die(mysql_error());
    $num=mysql_num_rows($res);

    if($num==0){    
        echo invalid user;
    } else {

        $fsprow=mysql_fetch_assoc($res);    
        session_unregister("admin_user");
        session_register("admin_user"); 

        $_SESSION['admin_user']=$_POST['username'];     

        session_unregister("admin_id");
        session_register("admin_id");

        $_SESSION['admin_id']=$fsprow['id'];

        echo'<script language="javascript">window.location.href="welcome.php";</script>';
    } 

here this is index.php page
and i will check every page whether user logged in or not

<?
session_start();
if(!isset($_SESSION['admin_id']) && !isset($_SESSION['admin_user']) ){
    header('location:index.php'); 
}
?>

so what it does is it will redirect to index page if he does not logged in
in this way u can create my accont or my profile like that
ithink this is what u want hope this may help you

Edited by Dani: Formatting fixed

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.