<?
require("config.inc");
$adminID = $_GET['adminID'];
$AdminName = $_POST['Aname'];
$Password = $_POST['Apass'];
//echo "<script>alert('".$productType."');</script>";
$result = mysql_query("update tbl_admin SET username='$AdminName',password='$Password' where user_ID='$adminID'");
//$row = mysql_fetch_array($result);
if($result-->0){
echo "<script>alert('Update Success');</script>";
echo "<script>window.location='editAdmin.php?adminID=".$adminID."';</script>";
}
else{echo "<script>alert('Failed to update');</script>";
echo "<script>window.location='editAdmin.php?adminID=".$adminID."';</script>";}
?>