www.webdeveloper.com
Results 1 to 5 of 5

Thread: PHP Global What? SOS need help!

  1. #1
    Join Date
    Dec 2013
    Posts
    12

    PHP Global What? SOS need help!

    Hello Friends

    I just changed my host, I am getting this error on my scrip which worked fine with my old host.
    Please can anyone help me with this?
    this is the error message I get

    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

    This is my script
    PHP Code:
    //
    if (!$_SESSION['username']) 
    //
    //IF EMPTY REDIRECT TO THE LOGIN PAGE AND ECHO ERROR MESSAGE, THEN EXIT
    {header("location: login.php?login=error");
    exit();}

    require_once('../nissan/juke.php'); 
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Treasure Care Home Health :: Administrator's Page</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    <style type="text/css">
    <!--
    @import url("_mmServerScripts/.subheading.css");
    -->
    </style>
    </head>
    <body bgcolor="#FFFFFF">
    <style TYPE="text/css">
    <!--  A:link {text-decoration: none; color:#000055}  A:visited {text-decoration: none; color:#000055}  A:active {text-decoration: none; color:#000022}   A:hover {text-decoration: ; color:#00CC00 }-->
    </style>
    <form action="search.php" method="post">
      <table width="845" border="0" align="center" cellpadding="0" cellspacing="2">
        <tr> 
          <td align="left">
            <img border="0" src="logo.png" width="430" height="81"></td>
        </tr>
        <tr>
        <?php // $username = $_GET['username']; //= $_GET['username'];
    //$password = $_GET['password'];//= $_GET['password'];
      
    ?>
          <td align="center">Recruitment Profile Administrator: You are logged in as<font color="#000066"> <strong><?php echo $_GET['username']; ?></strong></font></td>
        </tr>

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,175
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Dec 2013
    Posts
    12
    Thanks Nog,
    I seem to have done everything as outlined but still getting the same error message.
    But guess what? It was just a misspelled variable causing all the traffic. Thank you for help me point this out

  4. #4
    Join Date
    Jul 2013
    Posts
    6
    $GLOBAL is a PHP super global variable which is used to access global variables from anywhere in the PHP script (also from within functions or methods).
    ______________________________________________

  5. #5
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,175
    Quote Originally Posted by jj91171 View Post
    $GLOBAL is a PHP super global variable which is used to access global variables from anywhere in the PHP script (also from within functions or methods).
    ______________________________________________
    You might consider actually reading all of the original post and the replies before adding a reply that has nothing to do with the problem. *sigh*
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles