You are here: Re: form with two buttons « HTML « IT news, forums, messages
Re: form with two buttons

Posted by rwap on 11/17/42 11:53

walterbyrd@iname.com wrote:
> I want a simple form, but with two buttons: login and logout. I
> understand that I can do this by placing a form within a form.
>
> Here is what I have. It looks okay, but the logout button is just like
> pressing the login button.
>
> <table border="3" bgcolor="#EEEEEE" width="30%" align="center"
> valign="center" cellpadding="10%">
> <tr><th bgcolor="#6699FF"><font
> color="#FFFFFF">Login/Loguot:</font></th></tr>
> <tr><td>
> <form action="authenticate.php" method=POST>
> Username:<br>
> <input type="text" name="username">
> <br><br>
> Password:<br>
> <input type="password" name="password">
> <br><br>
> <input type="submit" value="Log In">
> <form>
> <input type="button" value="Log Out"
> onclick="http://localhost/WMS/logout.php">
> </form>
> </form>
> </td></tr>
> </table>
>
>
> I have also tried:
>
> <form action="logout.php">
> <input type="submit" value="Log Out">
> </form>
>
> But that does not work either.

I have done something similar to this in Perl - the answer is to use
the one script (PHP or Perl) and not two - the script should then check
the value passed to it when called - ie looks for value="Log Out" or
value="Log In"

Rich Mellor
www.internetbusinessangels.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация