<?php

include_once"../config.php";
session_start();
$user = $_POST['name'];
$email = $_POST['email'];
$pwd = $_POST['pwd'];
$repwd = $_POST['repwd'];

if($pwd){
if($pwd == $repwd){
	mysqli_query($con,"update  loginadmin set user= '$user', email = '$email', pwd = '$pwd' where id = '1'");
    $_SESSION['try']=1;
	header("location:../edit_profile.php?try=1");
}else{
	$_SESSION['try']=4;
	header("location:../edit_profile.php?try=4");
}
}else{
	mysqli_query($con,"update  loginadmin set user= '$user', email = '$email'  where id = '1'");
$_SESSION['try']=1;
	header("location:../edit_profile.php?try=1");
}