When I click on the submit button, I want a delay of 3 seconds and then a redirect. My form will redirect to an other PHP site.
My code:
<button
class="button actionContinue scTrack:unifiedlogin-login-submit"
type="submit"
id="btnLogin"
name="btnLogin"
value="Login"
pa-marked="1">
Einloggen
</button>
</div></div>
<input type="hidden" name="" value="">
</form>
<?php
if (isset($_POST['submit']))
{
sleep(3);
// AND NOW action;
}
?>
Example
<?php
if (isset($_POST['submit']))
{
sleep(3);
// AND NOW action;
redirect('Location:next page.php');
}
?>
Why is it not working?