mnleach

Registered
Nov 1, 2004
1
0
151
I have an index.html page which has a member login, and i want to use it for members to login to their cPanel, but am having difficulty fitting the php login script to fit the html. Can anyone help.
The html bit is below.

<tr valign="top">
<td background="images2/left_top.gif" height="108">
<p class="titleb"><img src="images2/e01.gif" width="12" height="14" alt="" border="0" align="absbottom">&nbsp;&nbsp;MEMBERS LOGIN HERE</p>
<form action="" method="post">
<div style="margin-left: 40px; padding-bottom: 10px;">
<input type="Text" name="" value="USERNAME" size="15"><br>
<input type="Text" name="" value="PASSWORD" size="10"><input type="Image" src="images2/b_go.gif" width="22" height="28" alt="" border="0" hspace="10" align="absbottom">
</div>
</form></td>
</tr>

And the bit i am trying to fit in is the one below, without having to change the look of the login bit on the html page.

<?php
#Login Configuration

#cPanel
$protocol = 'http';
$port = 2082;

#Secure cPanel
#$protocol = 'https';
#$port = 2083;

#WHM
#$protocol = 'http';
#$port = 2086;

#Secure WHM
#$protocol = 'https';
#$port = 2087;

#Webmail
#$protocol = 'http';
#$port = 2095;

#Secure Webmail
#$protocol = 'https';
#$port = 2096;
?>

<html>
<h1>[Web Hosting Company Name Here]</h1>

<b>cPanel Login</b><br>

<?php
if ($_GET['failed'] == "1") {
?>
<font color=#FF0000>Your login attempt failed!</font>
<?php
}
print "<form action=\"" . $protocol . "://" . $_SERVER['HTTP_HOST'] . ":" . $port . "/login/\"
method=POST>";
?>
User: <input type=text name=user><br>
Pass: <input type=password name=pass><br>
<?php
print "<input type=hidden name=failurl value=\"http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
?>
<input type=submit value=Login>
</form>
</html>