{
            $data = trim($data);
            $data = stripslashes($data);
            $data = htmlspecialchars($data);
            $data = mysql_real_escape_string($data);
            return $data;
        }
        $Firstname = check_input($_POST['Firstname']);
        $Lastname = check_input($_POST['Lastname']);
        $Address = check_input($_POST['Address']);
        $Email = check_input($_POST['Email']);
        $Mobile = check_input($_POST['Mobile']);
        if (!preg_match("/\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*/", $_POST['Email'])) {
            $errmsg .= "Invalid email address";
        } else {
            if ($userobj->edit_userPersonal($Userid, $Firstname, $Lastname, $Address, $Email, $Mobile)) {
                $msg .= 'Profile Details successfully updated.<br>';
            } else {
                $errmsg .= '!Opps Some thing went wrong.<br>';
            }
        }
    }
}
include_once "../../includes/dbclose.inc.php";
require_once "../layouts/user_header.php";
?>
		 <!-- Begin lefttcolumn -->
		<div id="leftcolumn">
        <table width="190" border="0">
          <tr>
            <td bgcolor="#CCCCFF" align="center"><strong>Main Menu</strong></td>