<?php
    include("connection.php");
?>
<html>
<SCRIPT>
    function reload(){
        opener.location.reload();
	}
</SCRIPT>
<body bgcolor="#871F1F" text="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">
<?php

    $name=$_GET["name"];
	if(strlen($name)>0){
		
		$requete="DROP USER \"$name\"";

		pg_query($c,"begin");

		$resultset = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
		//OCIExecute($resultset,OCI_DEFAULT);
				
		// Validation de la transaction
		pg_query($c,"commit");
			
		
		
		
	}else{
	    print"<center><strong>Error: missing parameter</strong></center>";
		print '</body></html>';
		return;
	}

	print '<center><H1>User update done</H1><br>';
	print '<input name="Exit" type="button" value="-= Close window =-" onClick="javascript:self.close();"></center>';


?>
</body>
</html>