Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
February 09, 2012, 07:00:00 PM

Pages: [1]   Go Down
  Print  
Author Topic: Help with login button, please.  (Read 779 times)
gaypo0
Space Explorer
***
Offline Offline

Posts: 9


« on: November 17, 2009, 12:25:23 AM »

Okay so I am a total n00b at all of this so bear with me please. Basically I'm trying to create a login button. Here is what I have so far.

<div class="logintable"><img src="images/title.jpg" width="550" height="320">
  <table align="center" >

              <form name="form1" method="post" action="dlgaze/dlgaze-login-check.php">
   
    <tr>
   
                <td width="95"> <strong><font color="#FF9933" size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;USERNAME:</font></strong>
                </td>
   
    <td width="240">
                    <input type="text" name="username">

                   </td>
   
    </tr>

   
    <tr>
   
                <td> <strong><font color="#FF9933" size="2" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;PASSWORD:
                  </font></strong> </td>
   
    <td><input type="password" name="password">
                    &nbsp;
                    <input type="Button" name="Submit" value="Login">&nbsp; </td>

Basically what do I do to get it to go to the next page? Do I have to use the code "onclick" or something? HELP please.
Logged
scanman20
Über Jedi
*****
Offline Offline

Posts: 1520



WWW
« Reply #1 on: November 17, 2009, 06:05:39 AM »

First it's best to post code using the code tags in the forum so it comes through more cleanly. Second, and to answer your question, it would be easiest to change the line
Code:
<input type="Button" name="Submit" value="Login">
to
Code:
<input type="submit" name="Submit" value="Login">
I see no need to use the onclick event but you can if you want.
Logged

Even a broken clock is right twice a day.
NotOneBit.com
MCSE - MCSA - MCP
MrPhil
Berserker Poster
*****
Offline Offline

Posts: 5083



« Reply #2 on: November 17, 2009, 08:54:13 AM »

You may also be having problems with the nesting of the table elements and the form elements. I would move the <form> tag to before the <table> tag, so that the table is entirely within the form (individual form elements are completely within a table cell). What you're currently doing may not work on all browsers.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: