Connect to Database

PHOTO EMBED

Sun Apr 02 2023 16:52:26 GMT+0000 (Coordinated Universal Time)

Saved by @Joe_Devs #php #mysql

<?php
//hostname,username,password,database
$connection = mysqli_connect('localhost', 'root', '', 'loginapp');

if(!$connection){
die('connection failed')
}
content_copyCOPY

code to connect to a database - you can make this a separate file just make sure to include it in your project