<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
mysql_selectDB("wauhaha_karaoke",$login);

$ProID = $_GET['ProID'];
$p = $_POST['p'];

if($p == ""){
				echo "<script>alert('Please fill in your form completely')</script>";
				echo "<script language='javascript'>window.location='adprice.php?ProID=$ProID'</script>";die;

}

$query = mysql_query("Update kstock set sprice = '$p' where ProID = '$ProID'");

if($query){
						echo "<script>alert('Adjust Successful')</script>";
						echo "<script language='javascript'>window.location='adfood.php?ProID=$ProID'</script>";


}