• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1187
  • Last Modified:

creating button php/html

Hi, I am trying to place a submit button in my form, that links to the registration page.  I seem to be missing something :) Can anyone help?
This is the code for the form:
[CODE]
<form name="form1" method="post" action="<?php print "$PHP_SELF"; ?>">
              <table width="434"  border="0" align="left">
              <tr>
                <th width="133" scope="row"><?php print "$lang_username";?> :</th>
                <td width="45">&nbsp;</td>
                <td width="181"><input type="text" name="username" value="<?php $temp=$_COOKIE['cookieusername'];print "$temp"; ?>">&nbsp;<font color="#FF0000">*</font></td>
                <td width="57">&nbsp;</td>
              </tr>
              <tr>
                <th scope="row"><?php print "$lang_password";?> : </th>
                <td>&nbsp;</td>
                <td><input type="password" name="password">&nbsp;<font color="#FF0000">*</font></td>
                <td>&nbsp;</td>
              </tr>  
                          <tr>
                <th scope="row"></th>
                <td>&nbsp;</td>
                <td>
                                 <input type='checkbox' name="remember" value="1"><?php print "$lang_remember";?></td>
                <td>&nbsp;</td>
              </tr>      
              <tr>
                <th scope="row"><a href="cregister.php"><?php print "$lang_regi";?></a><br><a href="cforgetpass.php"><?php print "$lang_forgot";?></a></th>
                <td>&nbsp;</td>
                <td><input type="submit" name="userlogin" value="<?php print "$lang_login";?>"></td>
                <td>&nbsp;</td>
              </tr>
            </table>                  
          </form>      
[/CODE]

At the moment there is a text link to the register page (cregister.php) what I want to do is move the register to the right of the Login button, and create similar button for "register".

Hope that makes sense :)
0
wood1e
Asked:
wood1e
  • 2
  • 2
  • 2
2 Solutions
 
PhatzerCommented:
<input type="button" onClick="window.location='cregister.php'; return true" name="userlogin" value="<?php print "$lang_regi";?>">

Stick this wherever you want it.. Should do the job :)
0
 
Vel EousResearch & Development ManagerCommented:
http://www.w3schools.com/tags/tag_button.asp

The <button></button> tag is another option, easily adapted for images aswell.

<button>Text</button>
<button><img src="" alt="" /></button>

Works in the same principle, just was developed for such uses.  The most commonly used method is the one one Phatzer has shown though.
0
 
wood1eAuthor Commented:
many thanks, to you both :)
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
wood1eAuthor Commented:
PS I will split the points...slightly more to Phatzer
0
 
Vel EousResearch & Development ManagerCommented:
:)
0
 
PhatzerCommented:
Thanks. Appreciated.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now