register_globals

Posted By: Ian on Nov 22, 2011 in Blog
Last modified on November 20th, 2013 at 10:27 am,

When i built the installer for Banner Bar i believed register_globals was off but i was mistaken my host enables it by default.
So when i was testing the installer and it worked fine for me anyone with register_globals off never got past the first page.
But today after realising this i have done two things turned register_globals off on my site and modified the installer so it now works with register_globals off!

<?php
if(ini_get('register_globals') ){
$error="true";
$register_globals = "On";
}else{
$register_globals = "Off";
}
?>

<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="UTF-8" />

<style type="text/css">
.green {
color:green
}

.red {
color:red
}
</style>

<title>Register Globals Test</title>
</head>
<body>

<div>
<?php if(($register_globals=="Off")) echo "<span class='green'>Register Globals is off - OK!</span>";
else echo "<span class='red'>Register Globals is on!</span>" ?>
</div>

</body>
</html>

 

Try Me

AnonymousIan.J.Gough

Did this help you? Please Let me know by commenting below even if it’s just to say “Thanks”

leave a comment

About This Site

Dreams are built from lines of code well it's true!
If you can dream it you can usually code it.

I have learned so much from other people on the Internet and this site is for me to give back some of what i have learned and hope people can now learn from me.
Have fun and surf safely,
Ian.J.Gough

protected by copyscape duplicate content check

Categories


Powered by Banner Bar 125