PHP 8 MYSQL Connection Tutorial | Learn PHP MYSQL Tutorial | PHP MYSQL Tutorial Latest 2021 | PHP

Опубликовано: 01 Октябрь 2024
на канале: Eagles Education
4,755
24

$connect=mysqli_connect("localhost","root","","as1") or die("Connection Failed");
// localhost - servername // root - username // "" - password //
$query="insert into student(name,marks) values('John', 100)";
if(mysqli_query($connect,$query))
{
echo "Record Inserted";
}
else
{
echo "Record Not Inserted";
}