GlowHost Web Hosting Forums  

Go Back   GlowHost Web Hosting Forums > In The Lounge > Programming Talk
Register Forum FAQ Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 08-14-2008
rlhanson's Avatar
Master Glow Jedi
 
Join Date: Aug 2007
Location: Chapman, Kansas
Posts: 343
Rep Power: 33
rlhanson will become famous soon enough
Send a message via Skype™ to rlhanson
Default

I have a script that allows clients to login to their cpanel or webmail from my website but it doesn't allow you to create an email account.

HTML Code:
 <form action="cplogin.php" method="post" target="_blank">
                                  <input type="hidden" value="2096" name="port" />
                                    <table width="60%" align="center" cellpadding="0" cellspacing="4" >
                                      <tr>
                                        <td >Username:</td>
                                        <td align="left"><input name="user" type="text" class="form_field" onfocus="clearDefaultandCSS(this)" value="full e-mail address" size="35" maxlength="50" /></td>
                                      </tr>
                                      <tr>
                                        <td >Password:</td>
                                        <td align="left"><input name="pass" type="password" class="form_field" size="35" maxlength="12" /></td>
                                      </tr>
 
                                      <tr>
                                        <td align="right" colspan="2"><div align="center">
                                          <input type="submit" name="login" value="login" style="cursor:pointer" />
                                        </div></td>
                                      </tr>
                                    </table>
                                    <br />
                                    For webmail, please use your <span style="font-weight: bold">full email address</span> (yourname@yourdomain.com) as your username. 
                                  </form>
clientlogin.php (php and html):
PHP Code:
<?php
#your domain or ip
$domain "missy.gendns9.com";
if(!
$_POST['login']) {
exit;
}
$user $_POST['user'];
$pass $_POST['pass'];
$port $_POST['port'];
$port == "2083" || $port == "2096" $pre "https://" $pre "http://";
?>
HTML Code:
<body onLoad="setTimeout('document.forms[0].submit();',10)">
<form action="<?php echo "".$pre."".$domain.":".$port."/login/"; ?>" method="post">
<input type="hidden" name="user" value="<?php echo $user; ?>">
<input type="hidden" name="pass" value="<?php echo $pass; ?>">
</form>

I found it on the web somewhere awhile ago.
__________________
Thank you,
Lynne Hanson
RL Hanson-Online

Last edited by rlhanson; 08-14-2008 at 12:50 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 11:37 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO
Copyright 2000-2007 GlowHost.com