View difference between Paste ID: qaP14hn1 and rHue8MVD
SHOW: | | - or go back to the newest paste.
1
<?php
2
//HARUSNYA
3
$error=null; /*asumsikan WAJIB*/
4
try{
5
	$sql = '';
6
	$query= $con->prepare($sql);
7
	$query->bindParam(1, $foto);
8
	$query->bindParam(2, $foto);
9
	$result = $query->execute();
10
	if($result){
11
	//jalankan script OK
12
	}
13
	else{
14
		die( $error);
15
	
16-
if($result){
16+
	}
17
}
18
catch(PDOException $e){
19-
else{
19+
20-
	die( $error);
20+
21
}
22-
}
22+
23
/*
24
script lainnya
25
*/