Hi I'm creating a login/registration and the database communication is fine already (data get's stored and loaded as intended). I used Adobe Muse to design the login page and used the form widget to create inputs. On the page "login.html" i have the following form:
<form class="form-grp clearfix mse_pre_init" id="widgetu63897" method="post" enctype="multipart/form-data" action="login_script.php">
<div class="fld-grp clearfix grpelem" id="widgetu63910" data-required="true"><!-- none box -->
<span class="fld-input NoWrap actAsDiv rounded-corners clearfix grpelem" id="u63913-4"><!-- content --><input class="wrapped-input" type="email" spellcheck="false" id="widgetu63910_input" name="email" tabindex="1"/><label class="wrapped-input fld-prompt" id="widgetu63910_prompt" for="widgetu63910_input"><span class="actAsPara">E-Mail or username</span></label></span>
</div>
<div class="fld-grp clearfix grpelem" id="widgetu63900" data-required="true" data-type="email"><!-- none box -->
<span class="fld-input NoWrap actAsDiv rounded-corners clearfix grpelem" id="u63901-4"><!-- content --><input class="wrapped-input" type="password" spellcheck="false" id="widgetu63900_input" name="password" tabindex="2"/><label class="wrapped-input fld-prompt" id="widgetu63900_prompt" for="widgetu63900_input"><span class="actAsPara">Password</span></label></span>
</div>
<button class="submit-btn NoWrap rounded-corners clearfix grpelem" id="u63909-4" data-muse-uid="U63909" data-muse-type="txt_frame" type="submit" value="Login" tabindex="3"><!-- content -->
<div style="margin-top:-12px;height:12px;">
<p>Login</p>
</div>
</button>
</form>
So to test if the login_script.php gets executed I let it send an email to myself which worked. However, if I want to redirect from login_script.php it doesn't work. I have deleted all the code from login_script.php exept for the redirections.
I've tried using
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
echo "<script type='text/javascript'>window.location.href = 'index.html';
}
?>
As well as
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
header('location:index.html');
}
?>
I have no clue what else I could try to fix this issue