[insert_php]

$servername = “127.0.0.1”;
$username = “root”;
$password = “e0Xd288I”;
$dbname = “charts”;

// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die(“Connection failed: ” . mysqli_connect_error());
}

$sql = “UPDATE myguests SET lastname=’twarren’ WHERE id=2”;

if (mysqli_query($conn, $sql)) {
echo “Record updated successfully”;
} else {
echo “Error updating record: ” . mysqli_error($conn);
}

mysqli_close($conn);

[/insert_php]