<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
mysql_selectDB("wauhaha_karaoke",$login);
$time = date("d/m/Y");


$ProID=$_POST['ProID'];
$ProName=$_POST['ProName'];


$ProTPrice= $ProPrice * $ProQuan ;
$SupID = $_GET['SupID'];
if(($ProID=="")||($ProName=="")){
				echo "<script>alert('Please fill in your form completely')</script>";
				echo "<script language='javascript'>window.location='addnewstock.php?SupID=$SupID'</script>";


}
if($ProName != ""){
	$result = mysql_query("SELECT ProName FROM stock WHERE ProName = '$ProName'");
if($result->num_rows == 1){
		echo "<script>alert('Your Product already had registered OR Your Product had been used! ')</script>";
		echo "<script language='javascript'>window.location='addnewstock.php?SupID=$SupID'</script>";
}else{






$result2 =mysql_query("select * from supplier where SupID='$SupID'");
$row3 =mysql_fetch_array($result2);





}
}


?>
	
















