Search
 
SCRIPT & CODE EXAMPLE
 

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();
}
?>
Comment

PREVIOUS NEXT
Code Example
Php :: check if post exists by id wordpress 
Php :: php mail in localhost wamp 
Php :: how to install laravel 
Php :: copy php array to another 
Php :: how to make a comment in php 
Php :: laravel hash password check 
Php :: php octal to decimal 
Php :: wordpress get post date 
Php :: stripslashes 
Php :: using php to add numbers in html form 
Php :: laravel except method 
Php :: gettype() function in PHP 
Php :: toggle between login and logout buttons php 
Php :: internal server error phpmyadmin 
Php :: laravel delete multiple rows 
Php :: symlink.php laravel 
Php :: why we use .htaccess file in php 
Php :: php check if string is integer 
Php :: How to add custom button in wordpress admin section 
Php :: laravel search multiple (related) tables 
Php :: laravel intersect 
Php :: strip non numeric and period php 
Php :: codeigniter session destroy automatically after redirect 
Php :: convert png image transparent into webp php 
Php :: Remove class from body tag in wordpress 
Php :: laravel modules 
Php :: php convert array to json 
Php :: json encode php 
Php :: post data to another page contact form 7 
Php :: laravel where in 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =