Langali
Langali

Reputation: 3207

Posting a link as Submit Button

   <form method="POST" action="auth/signin">
        Username: <input name="username" type="text" value=""/>
        Password: <input name="password" type="password" value=""/>
        <a href="auth/signin">Log In</a>
    </form>

How do I post the parameters when the "Log In" link is clicked (instead of using the submit button)?

Upvotes: 4

Views: 484

Answers (1)

Mark Byers
Mark Byers

Reputation: 838246

I think you need Javascript, something like this:

<a href="javascript:document.yourform.submit();">Log In</a>

Upvotes: 6

Related Questions