|
PHP внес на податоци во
табела
<?php
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "mojaDB";
$conn
= new
mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Nema
konekcija
" . $conn->connect_error);
}
$sql = "INSERT INTO
Ucenici (ime, prezime, email)
VALUES ('Nekoj', 'Nekojski', 'nekoj@yahoo.com')";
if ($conn->query($sql)
=== TRUE) {
echo
"Slogot uspesno
vpisan ";
} else {
echo
"Greska : " . $sql .
"<br>" . $conn->error;
}
$conn->close();
?>
|
|