I have a page \"index.php\" where i have a link called \"add_users.php\". In \"add_users.php\", I accept user information and come back to the same page \"index.php\" where
I think that using sessions is best way to prevent this problem
session_start();
if(!isset($_SESSION['s'])){
$_SESSION['s'] = true;
};
if( !empty( $_POST ) && ($_SESSION['s']) )
{
//your code
$_SESSION['s'] = false;
}
Afterwards you may use unset($_SESSION['s']) or destroy_session() if you want users to be able to post something again.