Two "form Action's" On One Line
I have just finished putting a login and register bit on my website and now I'm just cleaning things up, but then I came to this problem I have two form action's on one page, each
Solution 1:
<spanstyle="float:left;"><formaction='logout.php'method='POST'><inputtype='submit'value='Logout' /></form></span><spanstyle="float:right;"><formaction='changepassword.php'method='POST'><inputtype='submit'value='Change password' /></form></span>
Solution 2:
If I understand your question properly, I think you need to use some CSS:
form {
float: left;
width: auto;
}
You might want to add a class to those forms to stop yourself styling all forms like this
Solution 3:
Here's the dirty inline version
<formaction='logout.php'method='POST'style='float:left;'><inputtype='submit'value='Logout' /></form><formaction='changepassword.php'method='POST'><inputtype='submit'value='Change password' /></form>
Of course James's suggestion to use a class is the proper way to do it.
Btw, those forms should be after the opening body tag.
Post a Comment for "Two "form Action's" On One Line"