I'm using a standard form in combination with two if constructs and I am not sure if the syntax are ok. Is there a better way to refactor the following code?
if(!isset($_POST['submit']))
{
}
if(isset($_POST['submit']))
{
}
<form class="mt20" enctype="multipart/form-data" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" >
<input type="submit" name="submit" value="speichern">
</form>
Pressing the submit button the site should be reloaded and the code within the if(!isset( ...
bracket should not be executed. For hundreds of users the code is not executed. But there is one user where the code is executed.