You can either use a simple javascript redirect(<script>window.location=''''</script>) or you can try passing a variable with the data and then change its value when you execute your query. Ex.
if($i = '0')
{
//Execute query
$i = '1';
}
else
{
echo "Your Entry has already occured";
}