CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Threaded View

  1. #1
    Join Date
    Aug 2006
    Location
    Dallas, TX
    Posts
    47

    [RESOLVED] Sessions

    Every time i try to pass variables in the session data to the next form nothing gets transferred. The session gets created but the variables are not created and no values are assigned to them. Any help would be appreciated

    PHP Code:
    if(!$db){
      
    trigger_error("Could not perform the specified query. Please contact an admin!",E_USER_ERROR);
    }else{
      
    $sql "SELECT * FROM users WHERE UserName='$usernme'";
      
    $resultmysql_query($sql);
      while (
    $myrow mysql_fetch_array($result)) {
        if (
    $myrow['UserName']===$usernme && $myrow['Password']===$password){
          if(
    $myrow['Verified']==="1"){
            
    session_start();
            
    session_register('user','pass');
            
    $user=$myrow["UserName"];
            
    $pass=$myrow["Password"];
            
    header("Location: /igl/user.php?$PHPSESSID");
          }else{
            
    $error="Sorry, Your account has not yet been activated!";
          }
        }else{
          
    $error="Sorry, Username or Password invalid!";
        }
      } 

    Last edited by cypher5783; August 31st, 2006 at 09:12 PM. Reason: organization

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured