I'm new to PHP so be gentle. I have an html form in a PHP wordpress site that contains a 'Forgot Password' link which seems to perform the same action as submitting the form with the login button. I need to change this to re-direct them to a forgot password page. Depending on the username, the fp link could be redirected to a number of different sites but I need to determine whether the user clicked the fp link or the submit button to perform subsequent logic.
Can someone please let me know how I'd determine this in the login-script.php?
<form action="/" data-verify="<?php bloginfo('template_url') ?>/client-api.php" id="client-login" method="post">
<div class="login__popup--container">
<div class="login__popup--box">
<div class="login__popup--toggle">×</div>
<div class="login__popup--content"></div>
</div>
</div>
<div class="m-name">
<input placeholder="Username" type="text" name="userid" id="f-name" class="login__input" tabindex="1" accesskey="u"/>
<p><a href="#" data-forgot-username>Forgot your username?</a></p>
</div>
<div class="m-pass">
<input placeholder="Password" type="password" name="passwd" id="f-pass" tabindex="2" accesskey="p" class="login__input"/>
<p><a href="#" data-forgot-password="client-login">Forgot your password?</a></p>
</div>
<div class="m-sub">
<button type="submit" class="get-started login__submit">Login<span class="rarr">→</span></button>
</div>
</form>