PDA

View Full Version : Editing an existing login form?



build-a-host
April 7th, 2009, 15:28
Hello all, I am working on a new website design for my website. The template I bought has a login form at the very top of the page, and I would like to use it but, I have no idea how to code it so that it works correctly.

I was hoping one of you might be able to code this little bit for me so that it works. In return I could offer a small reseller account but, thats about it at the moment.

The login form is located at the top of the page here (http://abudgetwebhost.com/test/).

The current code for the form is:

<form action="" method="post" name="login" class="login">
<img style="float:left;" src="images/mem_area.gif" alt=" " width="115" height="15" />
<input name="text" value="login" type="text" onclick="this.value=''" />&nbsp;&nbsp;<input name="text" value="password" type="text" onclick="this.value=''" />&nbsp;&nbsp;<input name="reset" type="reset" value="" style="width:50px; height:18px; vertical-align:middle; background:url(images/button_login.gif) no-repeat top right; border:0px none; cursor:hand; cursor:pointer; float:right; margin-top:-20px;"/>
</form>

And I would like to user to be logged into my client area at http://abudgetwebhost.com/clients.

I have a login form up and running on the current design (http://abudgetwebhost.com) (up in the top left) but, it isn't setup the same as the one on the new design. If it helps, the code for the existing login is:


<FORM action=http://abudgetwebhost.com/clients/index.php?fuse=admin&amp;action=Login method=post>
Client Area Login
<br />
<TABLE cellSpacing=0 cellPadding=1 border=0>
<TBODY>
<TR>
<TD style="TEXT-ALIGN: right">
Login:
</TD>
<TD>
<INPUT style="WIDTH: 100px" name=email>
</TD>
</TR>
<TR>
<TD style="TEXT-ALIGN: right">
Password:
</TD>
<TD>
<INPUT type="password" style="width: 100px;" name="passed_password">
</TD>
</TR>
</TBODY>
</TABLE>
<INPUT type=submit value=Login name=btnSubmit>
</FORM>

I would really appreciate any help that anyone can offer. I am about done with the whole thing and thats all I am lacking, and I cannot seem to get it right!

Thanks in advance!

Dynash
April 7th, 2009, 16:03
This is it judging from your sourcecode. I haven't tested it though.


<form action="http://abudgetwebhost.com/clients/index.php?fuse=admin&action=Login&public=1" method="post" name="login" class="login">
<img style="float:left;" src="images/mem_area.gif" alt=" " width="115" height="15" />
<input name="email" value="login" id="email" type="text" onclick="this.value=''" />&nbsp;&nbsp;
<input name="passed_password" value="password" type="password" onclick="this.value=''" />&nbsp;&nbsp;
<input name="reset" type="reset" value="" style="width:50px; height:18px; vertical-align:middle; background:url(images/button_login.gif) no-repeat top right; border:0px none; cursor:hand; cursor:pointer; float:right; margin-top:-20px;"/>
<input type="submit" value="Login" name="btSubmit" />
</form>

build-a-host
April 7th, 2009, 16:26
Thanks but, there is a little problem somewhere. If you look at http://abudgetwebhost.com/test/index1.html , you can see that there is 2 login buttons there. I would like to use the orange one that fits the website. COuld you please edit that code so that the orange login button is the one thats used?

Thanks in advance Dynash, you're always a great help! + rep coming your way now.

Dynash
April 7th, 2009, 17:35
Oh right, remove the bottom line. <input type="submit" value="Login" name="btSubmit" />

I edited that in because I thought the first one was a reset, when it's actually a login.

build-a-host
April 7th, 2009, 19:22
Hmm,,it doesn't seem to be working. When you enter the username and pass, and then hit "Log in", it doesn't do anything?

This is what I have, you can see it at http://abudgetwebhost.com/test/


<form action="http://abudgetwebhost.com/clients/index.php?fuse=admin&action=Login&public=1" method="post" name="login" class="login">
<img style="float:left;" src="images/mem_area.gif" alt=" " width="115" height="15" />
<input name="email" value="login" id="email" type="text" onclick="this.value=''" />&nbsp;&nbsp;
<input name="passed_password" value="password" type="password" onclick="this.value=''" />&nbsp;&nbsp;
<input name="reset" type="reset" value="" style="width:50px; height:18px; vertical-align:middle; background:url(images/button_login.gif) no-repeat top right; border:0px none; cursor:hand; cursor:pointer; float:right; margin-top:-20px;"/>
</form>

Dynash
April 7th, 2009, 19:39
Yeah, change the values. As I said, the current one for some reason is set to reset.

So replace this:


<input name="reset" type="reset" value="" style="width:50px; height:18px; vertical-align:middle; background:url(images/button_login.gif) no-repeat top right; border:0px none; cursor:hand; cursor:pointer; float:right; margin-top:-20px;"/>

with this:


<input type="submit" value="Login" name="btSubmit" style="width:50px; height:18px; vertical-align:middle; background:url(images/button_login.gif) no-repeat top right; border:0px none; cursor:hand; cursor:pointer; float:right; margin-top:-20px;" />

build-a-host
April 7th, 2009, 19:46
You are the man Dynash, Thanks! It seems to be working now, the only problem I have now is that the login button looks like it's double up or something? If you look at http://abudgetwebhost.com/test/ , you can see that the login button looks like there are 2 on top of each other or something. Strange problem but, it works!

Edit: I got it fixed. Thanks for all your help Dynash!

Dynash
April 7th, 2009, 19:51
Replace where it has width:50px to 48, it'll remove the spaces.