<?php
	include "koneksi.php";
	//$nama=mysqli_real_escape_string($conn,$_POST["nama"]);
	$id=mysqli_real_escape_string($conn,$_GET["id"]);
	//$q="UPDATE jenis_motor SET nama='$nama' WHERE id='$id'";
	//mysqli_query($conn,$q);
	//header("location:jenismotor.php?p=2");
	
	//$q="SELECT * FROM user WHERE id='$id'";
	//$ress=mysqli_cuery($conn,q);
	
	$q="UPDATE user SET status=1 WHERE id='$id'";
	$update = $conn->query($q);
	if (! $update)
	{
		echo "gagal";
	}
	else if ($update)
	{
		//echo "berhasil";
		header("location:user.php?=1");
	}
	
	//header("location:user.php?p=3");
	
	//if (empty($nama))
	//{
		//header("location:updatejenismotor.php?p=1&id=".$id);
	//}
	//else
	//{
		//$q="SELECT * FROM jenis_motor WHERE nama='$nama'"; 
		//$res=mysqli_query($conn,$q);
		//if ($row=mysqli_fetch_assoc($res))
		//{
			//header("location:updatejenismotor.php?p=2");
		//}
		//else
		//{
			////$q="INSERT INTO kendaraan (nama,id_merkMotor) VALUES ('$nama','$id')";
			//$q="UPDATE jenis_motor SET nama='$nama' WHERE id='$id'";
			//$update = $conn->query($q);
		//}
		//if (! $update)
		//{
			//header("location:updatejenismotor.php?p=2&id=".$id);
		//}
		//else if ($update)
		//{
			//header("location:jenismotor.php?p=2&id=".$id);
		//}
	//}
?>