Below is my code, and is working fine.. The only problem is that when I refresh the page , It execute the success query.
<form action="" method="post">
<input type="submit" value="Purchase" id="btn" name="link_credits">
</form>
if(isset($_REQUEST['link_credits']))
{
echo "success";
//some codes here with sql statements
}
Else
{
echo " Please try Again tomorrow";
}
?>
Problem:
I don't want to run the query with page refresh, it should run the code only at button click.