<?php
session_start();
include 'koneksi.php';

        $username        = $_SESSION['username'];
        $id              = $_POST['id'];
        $nama_lengkap    = $_POST['nama_lengkap'];
         $alamat          = $_POST['alamat'];
        $nomor_ponsel    = $_POST['nomor_ponsel'];
        $email           = $_POST['email'];

        $edit = mysql_query("UPDATE t_user SET nama_lengkap='$nama_lengkap', email='$email', alamat='$alamat', nomor_ponsel='$nomor_ponsel' WHERE id_user='$id'") or die(mysql_error());
        if($edit) {
                echo "sukses";
        }
        else {
                echo "<script>alert('Gagal menyimpan data diri !'); window.location = 'editprofile.php'</script>";
        }
?>      