/    Sign up×
Community /Pin to ProfileBookmark

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

[code=php]
//
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>[/code]

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@speroxauthorJan 17.2014 — 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
Copy linkTweet thisAlerts:
@jj91171Jan 23.2014 — $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).

______________________________________________
Copy linkTweet thisAlerts:
@NogDogJan 23.2014 — $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).

______________________________________________[/QUOTE]


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*
×

Success!

Help @sperox spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...