Jump to content

unknown error


subhomoy

Recommended Posts

Hii i'm seeing this error....

Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0

My login code is....

<?php
                if(isset($_REQUEST['submit'])){
                    $uname = mysql_real_escape_string(htmlentities($_REQUEST['uname']));
                    $pwd = mysql_real_escape_string(htmlentities($_REQUEST['pwd']));
                    $code = mysql_real_escape_string(htmlentities($_REQUEST['code']));
                    if($uname && $pwd && $code){
                         
                    $result = mysql_query("SELECT * FROM users WHERE username='$uname' AND password='$pwd' AND code='$code'") or die(mysql_error());
                    while($row = mysql_fetch_array($result)){
                       $_SESSION['id'] = $row['id'];
                       $_SESSION['name1'] = $row['name'];
                        $uname1 = $row['username'];
                        $pwd1 = $row['password'];
                        $code1 = $row['code'];
                    }
                    if(($uname==$uname1) && ($pwd==$pwd1) && ($code==$code1)){
                        header("Location: members/home.php");
                    }
                    else
                        echo "<strong><center><font color='white'>Wrong Username or Password</font></center></strong>";
                    }  
                    else
                        echo "<strong><center><font color='white'>Enter All The Fields</font></center></strong>";
                }
            ?>

after login when the home page is loaded on top shows the error...

 

i've used this piece of code on top of every page to check whether a user is logged in or not...

if(!$_SESSION['name1'])header("Location: index.php");

Any help will be greatly appreciated.....

Edited by subhomoy
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.