“Masukkan php mysql” Kode Jawaban

Masukkan php mysql

<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDB";

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

$sql = "INSERT INTO MyGuests (firstname, lastname, email)
VALUES ('John', 'Doe', '[email protected]')";

if ($conn->query($sql) === TRUE) {
  echo "New record created successfully";
} else {
  echo "Error: " . $sql . "<br>" . $conn->error;
}

$conn->close();
?>
Jolly Jellyfish

masukkan ke php myqsl

$sql = "INSERT INTO database_table('arg1, 'arg2', ...) VALUES ('value1,
value2, ...)'";
Armandres

Jawaban yang mirip dengan “Masukkan php mysql”

Pertanyaan yang mirip dengan “Masukkan php mysql”

Lebih banyak jawaban terkait untuk “Masukkan php mysql” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya