<?php



include("../../base.php");


$client_no = rand(000,999);
$first_name=$_POST['firstname'];
$last_name=$_POST['lastname'];
$middle_name=$_POST['middlename'];
$email=$_POST['email'];
$resi_address=$_POST['address'];
$resi_address1=$_POST['address1'];
$hometel1=$_POST['hometel1'];
$hometel2=$_POST['hometel2'];
$hometel3=$_POST['hometel3'];
$home_tel="$hometel1-$hometel2-$hometel3";
$worktel1=$_POST['worktel1'];
$worktel2=$_POST['worktel2'];
$worktel3=$_POST['worktel3'];
$worktel4=$_POST['worktel4'];
$work_tel="$worktel1-$worktel2-$worktel3 Ext - $worktel4";
$mobtel1=$_POST['mobtel1'];
$mobtel2=$_POST['mobtel2'];
$mob_tel="$mobtel1-$mobtel2";
$account_no=$_POST['accountno'];
$user_id=$_POST['userid'];
$current_password=$_POST['password'];
$account_type=$_POST['accounttype'];
$dob=$_POST['dob'];
$pic = "";
$title=$_POST['title'];
$current_memo=$_POST['memoinfo'];
$greeting=$_POST['greeting'];
$bal = "";



$query = "INSERT INTO `mayis` (`client_no`,`first_name`,`last_name`,`middle_name`,`email`,`resi_address`,`resi_address1`,`home_tel`,`work_tel`,`mob_tel`,`account_no`,`user_id`,`current_password`,`account_type`,`dob`,`pic`,`title`,`current_memo`,`greeting`,`bal`)

VALUES('$client_no','$first_name','$last_name','$middle_name','$email','$resi_address','$resi_address1','$home_tel','$work_tel','$mob_tel','$account_no','$user_id','$current_password','$account_type','$dob','$pic','$title','$current_memo','$greeting','$bal');";

$insert = mysql_query($query) or die(mysql_error());
mysql_close();



$msg = "Account Record Inserted";

header("location: index.php?msg=$msg");



?>