• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

How to test a php login connected to a mysql db through xampp?

phpmysqllogindirectoryxampp


PHP Snippet 1:

include "../storescripts/connect_to_mysql.php";

PHP Snippet 2:

include "C:\xampp\htdocs\myonlinestore\storescripts\connect_to_mysql.php";

PHP Snippet 3:

<?php
   $server = "localhost";
   $connection = mysqli_connect ($server,"root","","your_database_name");
   if(!$connection){
    // if not connected it will gives the error here
    echo "server not found".mysql_error();
}   
else{
    echo "Connected";
}
?>

Related Snippets

Facebook API, get page post link (PHP)

How to add automatically collapse/expand in content wordpress (single.php)?

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

Shortcode or PHP inside a shortcode in Wordpress

Laravel post contact form giving me error 419

woocommerce get_order_report_data to show order_item_id

I want to display default profile image if user do not have profile image

How to add class name to an existing tag in php

WordPress Subquery returns more than 1 row on SELECT

CONCAT columns with Laravel 5 eloquent

Shopify password update using Shopify API

Using PHP to connect to a remote MSSQL database

Cut an arabic string

nginx err_connection_refused, can anyone help me?

Transfer data between JavaScript and PHP through JSON

About Contact Privacy policy Terms and conditions