Reputation: 75
I have one code , when execute this code i let do other thing , for example :
<?php
if ($ending=="ok")
{
$insert_end="ok";
}
if ($insert_end=="ok")
{
print "ok";
}
?>
But if i go the url and put for example :
http://www.domain.com/index.php?insert_end=ok
Execute the code and i don´t want this be possible because if some people know this can execute the code , it´s possible no let execute the code when put in url
Thank´s Regards
Upvotes: 0
Views: 49
Reputation: 5268
From what I could understand, try this:
if ($insert_end=="ok" && !array_key_exists('insert_end', $_GET))
{
print "ok";
}
Upvotes: 0
Reputation: 324820
Disable register_globals
in your php.ini
file. It should not be used for exactly this reason.
Upvotes: 2