Announcement

Collapse
No announcement yet.

email login form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • email login form

    Hi, I'm trying to make an email login form in my client's website.

    My idea is for my client to login to their email account from their website using their username only (no need to type @domain.com). I choose squirrel mail as their webmail.

    But the login form from squirrel mail keeps popping up.

    Btw, I'm a cPanel reseller. Thanks in advance

    here is my simplified code:

    <html>
    <head><title></title>

    <script language="JavaScript" type="text/JavaScript">

    function processinfo (){
    login_form.user.value = login_form.loginName.value + "@domain.com";
    login_form.pass.value = login_form.user_pwd.value;
    }

    </script>
    </head>

    <body>
    <form name="login_form" action= "https://domain.com:2096/3rdparty/squirrelmail/index.php" target = "new" onSubmit="processinfo()" method="post">

    Email Login<br>
    <input type="text" name="loginName" value="">


    Password<br>
    <input type="password" name="user_pwd" value="" >


    <input type="submit" name="login" value="Login">

    </form>
    </body>
    </html>

  • #2
    Hey ebobro,
    Your problem, do you mean it's popping up in a new window? or not logging in at all and the squirrel mail form is displayed?

    You have a malformed target attribute in the form tag. Try removing it or correcting it to target="_new".
    <form name="login_form" action= "https://domain.com:2096/3rdparty/squirrelmail/index.php" target = "new" onSubmit="processinfo()" method="post">
    If the pop-up is not the problem and squirrel mail is not being logged into, could you post the source of the squirrel mail login form please. Thanks.
    Aaron

    Comment


    • #3
      Programmer, Thank you for your reply. The problem is it wont log me in.

      Thanks in advance

      Below is the source of squirrel mail:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <link rel="shortcut icon" href="/unprotected/cpanel/favicon.ico" type="image/x-icon">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>cPanel&reg; 11</title>
      <link rel="stylesheet" href="/unprotected/cpanel/style.css" type="text/css">
      </head>

      <body>
      <div id="wrap">
      <div id="top-mail">

      </div>

      <div id="mid">
      <div id="content-wrap" align="center">
      <form action="/login/" method="POST">
      <input type="hidden" name="login_theme" value="cpanel">
      <table width="200" class="login" cellpadding="0" cellspacing="0">
      <tr>
      <td align="left"><b>Login</b></td>
      <td>&nbsp;</td>
      </tr>
      <tr>
      <td>Email</td>
      <td><input type="text" name="user" size="16"></td>
      </tr>

      <tr class="row2">
      <td>Password</td>
      <td><input type="password" name="pass" size="16"></td>
      </tr>
      <tr>
      <td>&nbsp;</td>
      <td><input type="submit" value="Login" class="input-button"></td>
      </tr>
      </table>
      </form>
      <br />
      <br />

      </div>
      </div>
      <div id="bot">

      </div>
      &copy; cPanel, Inc. 2006-2008
      </div>
      </body>
      </html>

      Comment


      • #4
        I manage to make this work and below is the source if anyone is interested

        Code:
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <title>cPanel&reg; 11</title>
        <script language="JavaScript" type="text/JavaScript">
        
        function processinfo (){
        login_form.user.value = login_form.username.value + "@mydomain.com";
        login_form.pass.value = login_form.password.value;
        }
        </script>
        </head>
        
        <body>
        
        <form name="login_form" action="https://mydomain.com:2096/login/" onSubmit="processinfo()" method="POST">
        <input type="hidden" name="login_theme" value="cpanel">
        
        Email
        <input type="text" name="username" size="16">
        
        <br/>
        
        Password
        <input type="password" name="password" size="16">
        
        	<input type="hidden" name="user" id="user" value="" >  
        	<input type="hidden" name="pass" id="pass" value="" > 
        
        
        <input type="submit" value="Login" class="input-button">
        </form>
        
        </body>
        </html>
        Next problem is my client wants to monitor some activities of his employees email activities, he wants to find out who, when and where (the IP address) his employee access their emails and send this details to him via email.

        My plan is to make a PHP script that is going to do all of this. This will change the action of my form. After it emails my client it will then redirect to "https://mydomain.com:2096/login/"

        Question is how can I forward the site without his employees noticing any difference. I tried to use
        Code:
        header("https://domain.com:2096/login/");
        but this requires them to re-login again.

        Please help me. I'm still a novice PHP programmer.

        Thanks

        Comment

        Working...
        X