Automatic login html page

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
theUsername
Posts: 6
Joined: Wed Nov 27, 2024 8:43 pm

Automatic login html page

Post by theUsername »

I'm trying to create a local html file which, upon opening, will automatically load the hesk admin site and login.
So far I have this:

<form id="form1" action="https://thewebsite.com/help/admin/index.php" method="post">
<input type=hidden name="regInputUsername" value="theusername"/>
<input type=hidden name="regInputPassword" value="thepassword"/>
<input type=hidden name="a" value="do_login"/>
</form>
<script>
window.onload = function() {
document.getElementById('form1').submit();
};
</script>

This doesn't seem to work. It loads the site, but has an error saying to enter the username and password. Any idea on what I'm missing? I'm not the best at this. Thank you in advance!

Jim
Klemen
Site Admin
Posts: 10139
Joined: Fri Feb 11, 2005 4:04 pm

Re: Automatic login html page

Post by Klemen »

Instead of regInputUsername and regInputPassword use

Code: Select all

name="user"
and

Code: Select all

name="pass"
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
theUsername
Posts: 6
Joined: Wed Nov 27, 2024 8:43 pm

Re: Automatic login html page

Post by theUsername »

That was it!!! I was looking at the label and not the name! Thank you!
Post Reply