ambioplex
05-28-2006, 07:45 AM
I'm trying to make a small login script for WHM autopilot, which I can place on the header section of my website. Much the same as bluehost.com has, only using WHM Autopilot instead of cPanel.
I've searched Google and some forums on how to do this, but can't find the answer. Has anybody done this before, or does anybody know how to do this?
Patrick
05-28-2006, 02:45 PM
Here is some very rough HTML code that you could use:
<form action="http://demo.whmautopilot.com/clogin.php" method="POST">
<table width="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" valign="bottom" align="center" height="20">Login</td>
</tr>
<tr>
<td width="7" valign="top" rowspan="3"> </td>
<td width="90" valign="middle" height="33">Username:</td>
<td width="203" valign="middle"><input name="username" type="text" class="form" id="username" size="25"></td>
</tr>
<tr>
<td valign="middle" width="90" height="33">Password:</td>
<td valign="middle" width="203"><input name="password" type="password" class="form" id="password" size="25"></td>
</tr>
<tr>
<td colspan="2" valign="middle" align="center" height="35"><input name="submit" type="submit" id="submit" value="Submit"></td>
</tr>
</table>
</form>
Just change http://demo.whmautopilot.com/clogin.php to your WHM Autopilot location.
EDITED BY REQUEST OF POSTER - Mod
ambioplex
05-28-2006, 02:55 PM
wouldn't that be used to log into the admin part of WHMa, not the client part? I changed it to domain.com/autopilot/clogin.php, which is the client's log in script. However, all the form does, is post whatever username and password is type, into Autopilot's log in form
Patrick
05-28-2006, 02:56 PM
Sorry about that, I did it for the admin login instead of the client login by mistake.
Are you saying it just types the data into the form (fills it out) but doesn't actually log you in?
ambioplex
05-28-2006, 05:01 PM
yeah, it doesn't actually process the login. it simply inserts the username and password I typed into WHMa's login form
Patrick
05-28-2006, 05:07 PM
That is odd, can you provide a link to the exact file (html / php) you are using?
I tested the code that I pasted above and it logs me into WHM Autopilots demo site without any issues.
ambioplex
05-29-2006, 07:45 AM
ok, the main site is www.ambioplex.com (http://www.ambioplex.com). the root directory WHMa is installed in, is www.ambioplex.com/manager (http://www.ambioplex.com/manager).
Currently, the one page which has the login form pointing to a processing script, is the homepage, www.ambioplex.com/index.php (http://www.ambioplex.com/index.php).
Patrick
05-29-2006, 08:20 AM
The problem was that you had the wrong ID's (txtPassword instead of password and txtDomain instead of username... plus submit).
Here is the working code, I just tested it out against your server:
<FORM action=http://www.ambioplex.com/manager/clogin.php method=post>
<TABLE cellSpacing=2 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width="64%" height=67 rowSpan=3> </TD>
<TD vAlign=center colSpan=2><SPAN
class="style21 style27">Login:</SPAN> </TD></TR>
<TR>
<TD vAlign=center width="9%"><SPAN
class="style19 style23 style28">Username:</SPAN></TD>
<TD vAlign=top width="27%"><INPUT id=username name=username></TD></TR>
<TR>
<TD vAlign=center height=24><SPAN
class="style19 style23 style28">Password:</SPAN></TD>
<TD vAlign=top width="27%"><INPUT id=password type=password
name=password>
<INPUT id=submit type=submit value=Login name=submit></TD></TR></TBODY></TABLE></FORM></TD></TR>
ambioplex
05-29-2006, 10:20 AM
Thanks Pat H, it's working fine now, thanks for taking the time to go over it. :-)