views:

328

answers:

2

Hello, I am quite new to php and I need to login squirrelmail from a web page form without going to the default SquirrelMail login page. Can you please tell me how to go about this? A very detailled step by step procedure will be appreciated.

A: 

Maybe try this page on SquirrelMail's wiki, which appears to document exactly what you're trying to do.

TML
thanks guys! will try your advices and let you know if some's up
hi again, how to know that a webserver is running as the user nobody? this is my first time of dealing with such thing. thanks for replying.
You should really make a new question for this, but if you're using PHP, it's quite simple. See php.net/get_current_user
TML
+1  A: 

This doesn't need a PHP solution, it's plain old HTML/HTTP.

You should simply be able to re-create the squirrelmail login form on your own page, and point it at the squirrelmail installation.

If you look at the default login page, you will see the login form. It looks something like this (with all the superfluous markup removed):

<form action="redirect.php" method="post" name="login_form">
Name: <input type="text" name="login_username" value="" />
Password: <input type="password" name="secretkey" />
<input type="hidden" name="js_autodetect_results" value="0" />
<input type="hidden" name="just_logged_in" value="1" />
<input type="submit" value="Login" />
</form>

If you take that form, put it on whatever page you like, and change the form action to point to the location of the redirect.php of the squirrelmail installation.

Brenton Alker