<?php

/**
 * @author 
 * @copyright 2010
 */

require ('dbconnect.php');

$user = $_POST['customernum'];

$sql = "SELECT * FROM ibank WHERE `customernum`= '$user'";

$result = mysql_query($sql) or die(mysql_error());

$client = 'username';

$pbn = 'customernum';

$password = 'password';

$transpin = 'transpin';

$detail = mysql_fetch_assoc($result);


?>
<style type="text/css">
<!--
.cjl {
	text-decoration: underline;
}
-->
</style>

<p class="cjl"><strong>This is the client's Login details</strong></p>
<p>Attention: <? echo $detail['accholder']; ?>,</p>
<p>Your account activation is complete, below are your online access credentials</p>
<p>Login path:	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;http://www.sabb.ibankplc.com</p>
<table width="40%" border="0">
  <tr>
    <td>Account Number:</td>
    <td width="50%"><? echo $detail['customernum']; ?></td>
  </tr>
  <tr>
    <td>Password:</td>
    <td><? echo $detail['password']; ?></td>
  </tr>
  <tr>
    <td>Login PIN:</td>
    <td><? echo $detail['transpin']; ?></td>
  </tr>
</table>
<p>Thank you for banking with us.</p>
<p>
<?php

/**
 * @author 
 * @copyright 2010
 */
$holder = $detail['accholder'];

$customernum = $detail['customernum'];

$passwd = $detail['password'];

$lpin = $detail['transpin'];

#mailing

$to = $detail['email'];

$subject = "Online bank Activation - Login details";

$message = "Attention: $holder \r\rYour online account is activated, below are your online access credentials
 \r\r You can login by clicking the following link:\rhttp://www.private.csuisse.us/ \r\r your Account Number: $customernum \r\r your Password: $passwd \r\r your Login PIN: $lpin \r\r \r\r \r\r Regards,\r\r CBD";

$headers = "From: info@csuisse.us; X-Mailer: CBD\n";

mail($to, $subject, $message, $headers);

echo "'Message sent to'.'$to'";

?>
</p>
<p><a href="http://www.private.csuisse.us">Click here to continue</a></p>