Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to acces sql with php

<?php
try{
    $sname = "localhost"; //just leave it as is 
    $uname = "test_name"; //the username 
    $password = "*************"; //the password

    $db_name = "test_db"; //the name of the db

    $conn = mysqli_connect($sname, $uname, $password, $db_name); //the connection
} catch(Exception $e){
    echo "activate your mySQL and add the user_db with all the values
";
    exit();
}
?>
 
PREVIOUS NEXT
Tagged: #acces #sql #php
ADD COMMENT
Topic
Name
8+6 =