amitroy5
February 9th, 2007, 03:43 AM
How can I make this script work without register_globals:
<? if ($page) { if ( @filesize ("$page" . ".html") ) { require ("$page.html"); } else { require ("missing.html"); } } else { require ("home.html"); } ?>
This calls any file form my website. Thus, I only need one layout for the whole thing.
As well as this one?
<? echo($email); ?>
I need this when the URL is http://mysite.com/script.php?email=whatever@whatever.com
It just hit me how insecure the second script is. I played around with it and I began inserting PHP code, making my website very easy to hack. Thanks!
<? if ($page) { if ( @filesize ("$page" . ".html") ) { require ("$page.html"); } else { require ("missing.html"); } } else { require ("home.html"); } ?>
This calls any file form my website. Thus, I only need one layout for the whole thing.
As well as this one?
<? echo($email); ?>
I need this when the URL is http://mysite.com/script.php?email=whatever@whatever.com
It just hit me how insecure the second script is. I played around with it and I began inserting PHP code, making my website very easy to hack. Thanks!