CodeAndCoins Forum

Official Forum of YouTube/CodeAndCoins Channel

Any problem, other than on a youtube video.

$servername = "localhost:3308";
$username = "root";
$password = "";
$dbname = "chocorangups";

// Create Connection
$conn = new mysqli ($servername, $username, $password, $dbname);
// Check Connection
if ($conn->connect_error)
die("Connection failed: " . $conn->connect_error);

//Arahan SQL (Structure Query Language)

//$ContohSQL = "DELETE FROM tbl_choco WHERE cust_address = '".$_REQUEST['txtModfield2']."' ";

//Arahan SQL (Structure Query Language)

//$ContohSQL = "UPDATE tbl_choco SET cust_name = 'Mohd Ali', cust_address = 'kota bharu' WHERE cust_id = '1' ";

$ContohSQL = "UPDATE tbl_choco SET cust_name = '".isset($_POST['txtModfield1'])."',cust_address = '".isset($_POST['txtModfield2'])."', phone_num = '".isset($_POST['txtModfield3'])."', type = '".isset($_POST['txtModfield4'])."', quantity= '".isset($_POST['txtModfield5'])."', WHERE cust_id = '".$_GET['custid']."' ";

//Dapatkan hasil pencarian
$hasilQuery = $conn->query($ContohSQL);
echo "Data sudah di update";
//Mengesahkan query
//Amaran jika gagal
echo "Query Failed: " . mysql_error();

php code not working

In that reply i also mention a php Playlist. First[…]

This may be happen because of mix matching the cod[…]

sorry, can I ask one last question? why this err[…]


Hi, I'm Jef. I've been living in Thailand for the […]