<?php session_start(); include"../connect/db.php" ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Admin| Users</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Font Awesome -->
    <link rel="stylesheet" href="../plugins/fontawesome-free/css/all.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <!-- DataTables -->
    <link rel="stylesheet" href="../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
    <link rel="stylesheet" href="../plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="../dist/css/adminlte.min.css">
    <!-- Google Font: Source Sans Pro -->
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
</head>

<body class="hold-transition sidebar-mini">
    <div class="wrapper">
        <!-- Navbar -->
        <nav class="main-header navbar navbar-expand navbar-white navbar-light">
            <!-- Left navbar links -->
            <ul class="navbar-nav">
                <li class="nav-item">
                    <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
                </li>
                <li class="nav-item d-none d-sm-inline-block">

                </li>
                <li class="nav-item d-none d-sm-inline-block">

                </li>
            </ul>

            <!-- SEARCH FORM -->

            <!-- Right navbar links -->
            <ul class="navbar-nav ml-auto">
                <!-- Messages Dropdown Menu -->

                <!-- Notifications Dropdown Menu -->

                <li class="nav-item">
                    <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
                        <i class="fas fa-th-large"></i>
                    </a>
                </li>
            </ul>
        </nav>
        <!-- /.navbar -->

        <!-- Main Sidebar Container -->


        <?php           


?>
        <aside class="main-sidebar sidebar-dark-primary elevation-4">
            <!-- Brand Logo -->
            <a href="../index3.html" class="brand-link">
                <img src="../dist/img/AdminLTELogo.png" alt="AdminLTE Logo" class="brand-image img-circle elevation-3"
                    style="opacity: .8">
                <span class="brand-text font-weight-light">Admin</span>
            </a>

            <!-- Sidebar -->

            <?php include"includes/sidebar.php" ?>

            <!-- /.sidebar -->
        </aside>

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1> Edit User</h1>

                            <div class="col-sm-6">

                            </div>
                        </div>
                    </div><!-- /.container-fluid -->
            </section>

            <!-- Main content -->
            <section class="content">

                <div class="container-fluid">

                    <div class="page-wrapper">



                        <?php
 include"../connect/db.php";
    $maga = mysqli_real_escape_string($con, $_GET['user'] ?? '');
    if (!empty($maga)) {
        $vanila = mysqli_query($con,"SELECT * FROM users WHERE email = '$maga' ");
        $crow = mysqli_fetch_assoc($vanila);
    } else {
        $crow = null;
    }

    if ($crow && $crow['gender'] == "Male") {
        $gender = 
        '
            <select name="gender" id="gender" required>
                 <option selected value="Male">Male</option>
                 <option value="Female">Female</option>
            </select>

        ';
    }
    else if ($crow) {
        $gender =
        '
            <select name="gender" id="gender" required>
                 <option value="Male">Male</option>
                 <option selected value="Female">Female</option>
            </select>

        ';
    }

?>

                        <!-- PAGE CONTAINER-->
                        <div class="page-container">
                            <!-- Switch Button -->






























                            <!-- MAIN CONTENT-->
                            <div class="main-content">

                                <div class="section__content section__content--p30">
                                    <div class="container-fluid">
                                        <div class="row">
                                            <div class="col-lg-1"></div>
                                            <div class="col-lg-10"><br><br>
                                                <div class="card">

                                                    <div class="card-body"
                                                        style="border-radius: 5px;box-shadow: 0 0 10px 5px #cecece;">
                                                        <!-- Switch Button -->

                                                        <?php


$result = mysqli_query($con, "SELECT crypto_status FROM users WHERE email = '$maga'");
$row = mysqli_fetch_assoc($result);
$crypto_status = $row['crypto_status'];
?>








                                                        <style>
                                                        /* Switch Container */
                                                        .switch-container {
                                                            display: inline-block;
                                                        }

                                                        /* The switch itself (hidden checkbox) */
                                                        .switch input {
                                                            display: none;
                                                        }

                                                        /* The slider (moving part of the switch) */
                                                        .slider {
                                                            position: relative;
                                                            display: inline-block;
                                                            width: 80px;
                                                            height: 35px;
                                                            background-color: #ff4d4d;
                                                            /* Default Red for Off */
                                                            border-radius: 35px;
                                                            transition: background-color 0.4s ease;
                                                        }

                                                        /* The moving part of the slider */
                                                        .slider:before {
                                                            position: absolute;
                                                            content: "";
                                                            width: 30px;
                                                            height: 30px;
                                                            border-radius: 50%;
                                                            background-color: white;
                                                            top: 2px;
                                                            left: 2px;
                                                            transition: transform 0.4s ease;
                                                        }

                                                        /* When the switch is checked (On) */
                                                        input:checked+.slider {
                                                            background-color: #4caf50;
                                                            /* Green for On */
                                                        }

                                                        input:checked+.slider:before {
                                                            transform: translateX(45px);
                                                            /* Move the slider ball to the right */
                                                        }

                                                        /* Text displaying On or Off */
                                                        .switch-text {
                                                            position: absolute;
                                                            width: 100%;
                                                            text-align: center;
                                                            line-height: 35px;
                                                            color: white;
                                                            font-weight: bold;
                                                            pointer-events: none;
                                                            /* Prevent text from interfering with clicks */
                                                            transition: opacity 0.4s ease;
                                                        }

                                                        /* Text color for On */
                                                        input:checked+.slider+.switch-text {
                                                            opacity: 0;
                                                        }

                                                        /* Text color for Off */
                                                        input:not(:checked)+.slider+.switch-text {
                                                            opacity: 1;
                                                        }
                                                        </style>



                                                        <script>
                                                        document.getElementById('toggleSwitch').addEventListener(
                                                            'change',
                                                            function() {
                                                                let switchText = document.getElementById(
                                                                    'switchText');
                                                                let cryptostats = this.checked ? "on" :
                                                                    "off"; // Set value based on switch state
                                                                switchText.textContent =
                                                                    cryptostats; // Update text content

                                                                // You may need to properly escape or encode this PHP variable if it's a string
                                                                let email = '<?=$maga?>';

                                                                $.ajax({
                                                                    url: '../apps/man/cryptotoggle.php',
                                                                    type: 'POST',
                                                                    data: {
                                                                        cryptostats: cryptostats, // Send the cryptostats value in the request
                                                                        email: email // Send the email value if needed
                                                                    },
                                                                    success: function(data) {
                                                                        let info = data.trim();
                                                                        if (info === "on") {
                                                                            toastAlert(true, "top-end",
                                                                                false, 3000,
                                                                                "success",
                                                                                "You have successfully activated the crypto dashboard"
                                                                            );
                                                                            setTimeout(function() {
                                                                                location
                                                                                    .reload();
                                                                            }, 3200);
                                                                        } else {
                                                                            toastAlert(true, "top-end",
                                                                                false, 3000,
                                                                                "success",
                                                                                "You have successfully deactivated the crypto dashboard"
                                                                            );
                                                                        }
                                                                    },
                                                                    error: function(jqXHR, textStatus,
                                                                        errorThrown) {
                                                                        console.error(
                                                                            "AJAX request failed:",
                                                                            textStatus, errorThrown);
                                                                        toastAlert(true, "top-end",
                                                                            false, 3000, "error",
                                                                            "An error occurred while processing your request"
                                                                        );
                                                                    }
                                                                });
                                                            });
                                                        </script>


                                                        <ul
                                                            class="nav nav-tabs nav-tabs-warning top-icon nav-justified">
                                                            <li class="nav-item">
                                                                <a href="javascript:void();" data-target="#profile"
                                                                    data-toggle="pill" class="nav-link active"><i
                                                                        class="icon-user"></i> <span
                                                                        class="hidden-xs"><?php echo $crow['email'] ?? $maga ?>
                                                                        Profile</span></a>
                                                            </li>
                                                        </ul>
                                                        <div class="tab-content p-3">
                                                            <div class="tab-pane active" id="profile">
                                                                <div class="row">
                                                                    <div class="col-lg-1"></div>
                                                                    <div class="col-lg-10">



                                                                        <style>
                                                                        .nav-tabs .nav-link {
                                                                            color: #007bff;
                                                                            transition: color 0.3s, background-color 0.3s;
                                                                        }

                                                                        .nav-tabs .nav-link.active {
                                                                            color: #fff;
                                                                            background-color: #007bff;
                                                                            border-color: #007bff;
                                                                        }

                                                                        .tab-content {
                                                                            padding: 10px;
                                                                            border: 1px solid #dee2e6;
                                                                            border-top: none;
                                                                        }

                                                                        .form-group.row {
                                                                            margin-bottom: 15px;
                                                                        }
                                                                        </style>
                                                                        <form>










                                                                            <div class="tab-container">
                                                                                <ul class="nav nav-tabs">
                                                                                    <li class="nav-item">
                                                                                        <a class="nav-link active"
                                                                                            href="#personal-info"
                                                                                            data-toggle="tab">Create
                                                                                            Account</a>
                                                                                    </li>



                                                                                </ul>

                                                                                <div class="tab-content mt-3">
                                                                                    <!-- Personal Information Tab -->
                                                                                    <div class="tab-pane fade show active"
                                                                                        id="personal-info">

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">First
                                                                                                Name</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="firstname"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Last
                                                                                                Name</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="lastname"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Middle
                                                                                                Name</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="middlename"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Nickname</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="nickname"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Email</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="email"
                                                                                                    type="email"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Phone</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="phone"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Date
                                                                                                of Birth</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="dob"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>
                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Zip
                                                                                                Code</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="zipcode"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Title</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="title"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Gender</label>
                                                                                            <div class="col-lg-9">
                                                                                                <select
                                                                                                    class="form-control"
                                                                                                    name="gender"
                                                                                                    id="gender">
                                                                                                    <option
                                                                                                        value="male">
                                                                                                        Male</option>
                                                                                                    <option
                                                                                                        value="female">
                                                                                                        Female</option>
                                                                                                    <option
                                                                                                        value="other">
                                                                                                        Other</option>
                                                                                                </select>
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Address</label>
                                                                                            <div class="col-lg-9">
                                                                                                <textarea
                                                                                                    class="form-control"
                                                                                                    name="address"
                                                                                                    id="address"></textarea>
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Country</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="country"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">State</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="state"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">SSN</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="ssn"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">City</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="city"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>


                                                                                        <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">User
                                                                                                Currency </label>
                                                                                            <div class="col-lg-9">
                                                                                               	<select  name="usercurrency"
																	id="usercurrency" class="form-control">
																	<option selected="" value="" >Select Account Currency
																	</option>
																	<option value="USD">America (United States) Dollars
																		– <?=$row['usercurrency']?></option>
																	<option value="AFN">Afghanistan Afghanis – AFN
																	</option>
																	<option value="ALL">Albania Leke – ALL</option>
																	<option value="DZD">Algeria Dinars – DZD</option>
																	<option value="ARS">Argentina Pesos – ARS</option>
																	<option value="AUD">Australia Dollars – AUD</option>
																	<option value="ATS">Austria Schillings – ATS
																	</option>

																	<option value="BSD">Bahamas Dollars – BSD</option>
																	<option value="BHD">Bahrain Dinars – BHD</option>
																	<option value="BDT">Bangladesh Taka – BDT</option>
																	<option value="BBD">Barbados Dollars – BBD</option>
																	<option value="BEF">Belgium Francs – BEF</option>
																	<option value="BMD">Bermuda Dollars – BMD</option>

																	<option value="BRL">Brazil Reais – BRL</option>
																	<option value="BGN">Bulgaria Leva – BGN</option>
																	<option value="CAD">Canada Dollars – CAD</option>
																	<option value="XOF">CFA BCEAO Francs – XOF</option>
																	<option value="XAF">CFA BEAC Francs – XAF</option>
																	<option value="CLP">Chile Pesos – CLP</option>

																	<option value="CNY">China Yuan Renminbi – CNY
																	</option>
																	<option value="CNY">RMB (China Yuan Renminbi) – CNY
																	</option>
																	<option value="COP">Colombia Pesos – COP</option>
																	<option value="XPF">CFP Francs – XPF</option>
																	<option value="CRC">Costa Rica Colones – CRC
																	</option>
																	<option value="HRK">Croatia Kuna – HRK</option>

																	<option value="CYP">Cyprus Pounds – CYP</option>
																	<option value="CZK">Czech Republic Koruny – CZK
																	</option>
																	<option value="DKK">Denmark Kroner – DKK</option>
																	<option value="DEM">Deutsche (Germany) Marks – DEM
																	</option>
																	<option value="DOP">Dominican Republic Pesos – DOP
																	</option>
																	<option value="NLG">Dutch (Netherlands) Guilders –
																		NLG</option>

																	<option value="XCD">Eastern Caribbean Dollars – XCD
																	</option>
																	<option value="EGP">Egypt Pounds – EGP</option>
																	<option value="EEK">Estonia Krooni – EEK</option>
																	<option value="EUR">Euro – EUR</option>
																	<option value="FJD">Fiji Dollars – FJD</option>
																	<option value="FIM">Finland Markkaa – FIM</option>

																	<option value="FRF*">France Francs – FRF*</option>
																	<option value="DEM">Germany Deutsche Marks – DEM
																	</option>
																	<option value="XAU">Gold Ounces – XAU</option>
																	<option value="GRD">Greece Drachmae – GRD</option>
																	<option value="GTQ">Guatemalan Quetzal – GTQ
																	</option>
																	<option value="NLG">Holland (Netherlands) Guilders –
																		NLG</option>
																	<option value="HKD">Hong Kong Dollars – HKD</option>

																	<option value="HUF">Hungary Forint – HUF</option>
																	<option value="ISK">Iceland Kronur – ISK</option>
																	<option value="XDR">IMF Special Drawing Right – XDR
																	</option>
																	<option value="INR">India Rupees – INR</option>
																	<option value="IDR">Indonesia Rupiahs – IDR</option>
																	<option value="IRR">Iran Rials – IRR</option>

																	<option value="IQD">Iraq Dinars – IQD</option>
																	<option value="IEP*">Ireland Pounds – IEP*</option>
																	<option value="ILS">Israel New Shekels – ILS
																	</option>
																	<option value="ITL*">Italy Lire – ITL*</option>
																	<option value="JMD">Jamaica Dollars – JMD</option>
																	<option value="JPY">Japan Yen – JPY</option>

																	<option value="JOD">Jordan Dinars – JOD</option>
																	<option value="KES">Kenya Shillings – KES</option>
																	<option value="KRW">Korea (South) Won – KRW</option>
																	<option value="KWD">Kuwait Dinars – KWD</option>
																	<option value="LBP">Lebanon Pounds – LBP</option>
																	<option value="LUF">Luxembourg Francs – LUF</option>

																	<option value="MYR">Malaysia Ringgits – MYR</option>
																	<option value="MTL">Malta Liri – MTL</option>
																	<option value="MUR">Mauritius Rupees – MUR</option>
																	<option value="MXN">Mexico Pesos – MXN</option>
																	<option value="MAD">Morocco Dirhams – MAD</option>
																	<option value="NLG">Netherlands Guilders – NLG
																	</option>

																	<option value="NZD">New Zealand Dollars – NZD
																	</option>
																	<option value="NGN">Nigeria Naira – NGN</option>
																	<option value="NOK">Norway Kroner – NOK</option>
																	<option value="OMR">Oman Rials – OMR</option>
																	<option value="PKR">Pakistan Rupees – PKR</option>
																	<option value="XPD">Palladium Ounces – XPD</option>
																	<option value="PEN">Peru Nuevos Soles – PEN</option>

																	<option value="PHP">Philippines Pesos – PHP</option>
																	<option value="XPT">Platinum Ounces – XPT</option>
																	<option value="PLN">Poland Zlotych – PLN</option>
																	<option value="PTE">Portugal Escudos – PTE</option>
																	<option value="QAR">Qatar Riyals – QAR</option>
																	<option value="RON">Romania New Lei – RON</option>

																	<option value="ROL">Romania Lei – ROL</option>
																	<option value="RUB">Russia Rubles – RUB</option>
																	<option value="SAR">Saudi Arabia Riyals – SAR
																	</option>
																	<option value="XAG">Silver Ounces – XAG</option>
																	<option value="SGD">Singapore Dollars – SGD</option>
																	<option value="SKK">Slovakia Koruny – SKK</option>

																	<option value="SIT">Slovenia Tolars – SIT</option>
																	<option value="ZAR">South Africa Rand – ZAR</option>
																	<option value="KRW">South Korea Won – KRW</option>
																	<option value="ESP">Spain Pesetas – ESP</option>

																	<option value="SDD">Sudan Dinars – SDD</option>
																	<option value="SEK">Sweden Kronor – SEK</option>
																	<option value="CHF">Switzerland Francs – CHF
																	</option>
																	<option value="TWD">Taiwan New Dollars – TWD
																	</option>
																	<option value="THB">Thailand Baht – THB</option>
																	<option value="TTD">Trinidad and Tobago Dollars –
																		TTD</option>

																	<option value="TND">Tunisia Dinars – TND</option>
																	<option value="TRY">Turkey New Lira – TRY</option>
																	<option value="AED">United Arab Emirates Dirhams –
																		AED</option>
																	<option value="GBP">United Kingdom Pounds – GBP
																	</option>
																	<option value="USD">United States Dollars – USD
																	</option>
																	<option value="VEB">Venezuela Bolivares – VEB
																	</option>

																	<option value="VND">Vietnam Dong – VND</option>
																	<option value="ZMK">Zambia Kwacha – ZMK</option>
																</select>
                                                                                            </div>
                                                                                        </div>
                                                                                          <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Account Type</label>
                                                                                            <div class="col-lg-9">
                                                                                               <select  name="account_type" id="account_type" class="form-control">
																	<option value="">Please select Account Type</option>
																	<option value="Checking Account">Checking Account
																	</option>
																	<option value="Savings Account">Saving Account
																	</option>
																	<option value="Fixed Deposit Account">Fixed Deposit
																		Account</option>
																	<option value="Current Account">Current Account
																	</option>
																
																	<option value="Business Account">Business Account
																	</option>
																	<option value="Non Resident Account">Non Resident
																		Account</option>
																	<option value="Cooperate Business Account">Cooperate
																		Business Account</option>
																	<option value="Investment Account">Investment
																		Account</option>
																</select>
                                                                                            </div>
                                                                                        </div>
                                                                                           <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Password</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="password"
                                                                                                    type="text"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>
                                                                                          <div class="form-group row">
                                                                                            <label
                                                                                                class="col-lg-3 col-form-label form-control-label">Profile Picture</label>
                                                                                            <div class="col-lg-9">
                                                                                                <input
                                                                                                    class="form-control"
                                                                                                    name="profile_pic"
                                                                                                    type="file"
                                                                                                    value="">
                                                                                            </div>
                                                                                        </div>

                                                                                        <div class="form-group row">
                                                                                            <div clas="col-12">
                                                                                                <span
                                                                                                    onclick="createaccount()"
                                                                                                    class="btn btn-warning pull-right">Submit
                                                                                                    Update</span>
                                                                                            </div>
                                                                                        </div>


                                                                                        <!-- Add more personal information fields as needed -->
                                                                                    </div>


                                                                                    <br>

                                                                        </form>


                                                                        <script>
                                                                        /*--------------------------
Update Profile
---------------------------- */
function createaccount(){







let firstname = $("input[name=firstname]").val();
let lastname = $("input[name=lastname]").val();
let middlename = $("input[name=middlename]").val();
let nickname = $("input[name=nickname]").val();
let email = $("input[name=email]").val();
let phone = $("input[name=phone]").val();
let dob = $("input[name=dob]").val();
let zipcode = $("input[name=zipcode]").val();
let title = $("input[name=title]").val();
let gender = $("#gender").val();
let address = $("#address").val();
let country = $("input[name=country]").val();
let state = $("input[name=state]").val();
let ssn = $("input[name=ssn]").val();
let city = $("input[name=city]").val();
let usercurrency = $("#usercurrency").val();
let account_type = $("#account_type").val();
let password = $("input[name=password]").val();
let profile_pic = $("input[name=profile_pic]").val();





if (firstname == "" || firstname == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the First Name"); return; }
if (lastname == "" || lastname == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Last Name"); return; }
if (middlename == "" || middlename == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Middle Name"); return; }
if (nickname == "" || nickname == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Nickname"); return; }
if (email == "" || email == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Email"); return; }
if (phone == "" || phone == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Phone Number"); return; }
if (dob == "" || dob == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Date of Birth"); return; }
if (zipcode == "" || zipcode == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Zip Code"); return; }
if (title == "" || title == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Title"); return; }
if (gender == "" || gender == null) { toastAlert(true, "top-end", false, 3000, "info", "Please select the Gender"); return; }
if (address == "" || address == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the Address"); return; }
if (country == "" || country == null) { toastAlert(true, "top-end", false, 3000, "info", "Please select the Country"); return; }
if (state == "" || state == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the State"); return; }
if (ssn == "" || ssn == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the SSN"); return; }
if (city == "" || city == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill the City"); return; }
if (usercurrency == "" || usercurrency == null) { toastAlert(true, "top-end", false, 3000, "info", "Please select the Currency"); return; }
if (account_type == "" || account_type == null) { toastAlert(true, "top-end", false, 3000, "info", "Please select the Account Type"); return; }
if (password == "" || password == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill in the password"); return; }
if (profile_pic == "" || profile_pic == null) { toastAlert(true, "top-end", false, 3000, "info", "Please fill in the profile picture"); return; }






    let form = $('form')[0]; // You need to use standard javascript object here
    let formData = new FormData(form);

  $.ajax({
    url : "../apps/man/createaccont.php",
    type : "POST",
    data : formData,
    processData: false,
    contentType: false,
    success : function(data){
      info = data.trim();
      if( info == "success" ){
        toastAlert(true,"top-end",false,2000,"success","Creation successfull");
        setTimeout(function(){ location="edit.php?user="+email } , 2500);
      }
      else{
        console.log(data);
        toastAlert(true,"top-end",false,3000,"error","Error==>"+data);
        return;
      }
    }
  })

}
                                                                        </script>
                                                                    </div>
                                                                    <div class="col-lg-1"></div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-lg-1"></div>
                                        </div>

                                    </div>
                                </div>
                            </div>
                            <!-- END MAIN CONTENT-->
                            <!-- END PAGE CONTAINER-->
                        </div>

                    </div>
                    <div class="row">



                        <div class="col-12">


                            <!-- /.card -->



                            <!-- /.card-body -->

                        </div>
                        <!-- /.card -->
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
        </div>
        <!-- /.container-fluid -->
        </section>
        <!-- MODAL CREATE TRANSACTION -->


        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <div class="float-right d-none d-sm-block">
            <b>Version</b> 1.0.0
        </div>
        <strong>Copyright &copy; 2021 <a href="#">Swagalomo's Admin</a>.</strong> All rights
        reserved.
    </footer>

    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
    </aside>
    <!-- /.control-sidebar -->
    </div>
    <!-- ./wrapper -->

    <!-- jQuery -->
    <script src="../plugins/jquery/jquery.min.js"></script>
    <!-- Bootstrap 4 -->
    <script src="../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
    <!-- DataTables -->
    <script src="../plugins/datatables/jquery.dataTables.min.js"></script>
    <script src="../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
    <script src="../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
    <script src="../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
    <!-- AdminLTE App -->
    <script src="../dist/js/adminlte.min.js"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="../dist/js/demo.js"></script>
    <!-- page script -->
    <script>
    $(function() {
        $("#example1").DataTable({
            "responsive": true,
            "autoWidth": false,
        });
        $('#example2').DataTable({
            "paging": true,
            "lengthChange": false,
            "searching": false,
            "ordering": true,
            "info": true,
            "autoWidth": false,
            "responsive": true,
        });
    });
    </script>

    <script src="js/sweetalert2.all.min.js"></script>
    <!-- Main JS-->
    <script src="js/main.js"></script>
    <script src="js/custom.js?v=1.3"></script>
</body>

</html>