demo_user auto login

jonn

Verified User
Joined
Mar 29, 2009
Messages
112
Location
Queensland, Australia.
Is there a way to set up the demo_user login
with one link or form button with hidden inputs.
Instead of the user typing in demo_user & demo on
login form to test the control panel.

Any ideas :confused:

thanks.
 
How would you differentiate, then, between a demo user, and someone who wanted to log into his/her own account?

Jeff
 
With a button:
Code:
<form action="http://server.name.example:2222/CMD_LOGIN" method="POST">
        <input type="hidden" name="username" value="demo_user">
        <input type="hidden" name="password" value="demo">
        <input type="submit" value="Enter demo account">
</form>

With a link
Code:
<form action="http://server.name.example:2222/CMD_LOGIN" method="POST" name="form">
        <input type="hidden" name="username" value="demo_user">
        <input type="hidden" name="password" value="demo">
        <a href="javascript:document.form.submit();">Enter demo account</a>
</form>

I wouldn't do it by the way... a user may want to see the login interface too, and how logout/logins are managed (for example, when a sessions times out the referrer remains in memory and the wanted page comes back after login) :)
 
Last edited:
So it seems it can be done. But you're right; I wouldn't do it either.

Jeff
 
With a button:
Code:
<form action="http://server.name.example:2222/CMD_LOGIN" method="POST">
        <input type="hidden" name="username" value="demo_user">
        <input type="hidden" name="password" value="demo">
        <input type="submit" value="Enter demo account">
</form>

With a link
Code:
<form action="http://server.name.example:2222/CMD_LOGIN" method="POST" name="form">
        <input type="hidden" name="username" value="demo_user">
        <input type="hidden" name="password" value="demo">
        <a href="javascript:document.form.submit();">Enter demo account</a>
</form>

I wouldn't do it by the way... a user may want to see the login interface too, and how logout/logins are managed (for example, when a sessions times out the referrer remains in memory and the wanted page comes back after login) :)


How could I center this? Without css, just with pure html, center totally both in the middle, up and down.???

HTML:
<form action="https://miserver.com:2222/CMD_LOGIN" method="POST">
        <input type="hidden" name="username" value="demo_user">
        <input type="hidden" name="password" value="demo">
        <input type="image" name="imageField" id="imageField" src="file://boton-web-oficial-es.png" formtarget="_blank" value="Demo DirectAdmin">
</form>
 
Back
Top