PDA

View Full Version : Web Based Login Form


Shade
2003-09-28, 13:43 PM
Hi guys.

I'm just wondering how I should attack building a web based login form... I would be doing it with PHP - does CPanel have any documentation (yes, I checked)...

Cheers!

-Shade

knightfoo
2003-09-28, 14:02 PM
It all depends what you want to do with it. Is this going to be part of a greater system, which needs to keep track of user sessions and authentication? What are the users logging into? What is your backend authentication method?

-knightfoo

Shade
2003-09-28, 14:11 PM
Originally posted by Shade
Hi guys.

I'm just wondering how I should attack building a web based login form... I would be doing it with PHP - does CPanel have any documentation (yes, I checked)...

Cheers!

-Shade

Well, I'd like to patch it through domainname.com:2082 using the current .htaccess system... I had thought about doing it by username being either the domainname of the hostee, or just a standard username. I'm just not sure how the cpanel authentication system works, or even where I could start... I've seen it done, so I know it is possible, but everywhere I look there's no more information other than a htaccess screenshot.

-Shade

Shade
2003-09-28, 19:20 PM
Update: Solution found

<script language="javascript">
function Login(form) {
var username = form.username.value;
var password = form.password.value;
if (username && password) {
var cpanel = "http://" + username + ":" + password + "@randomoutburst.com:2082/";
window.location = cpanel;
}
else {
alert("Please enter your username and password.");
}
}
</script>

-Shade