• 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

How do I get friend list from Friends table with counts of friends of my friends

Make Shipping Method fields Mandatory on Woocommerce checkout page

unable to load your default controller on Codeigniter

Detect if PHP session exists

Fetch files from next cloud storage and display in Laravel website

Nginx RTMP not recording

How to to send mail using gmail in Laravel?

Applying programmatically a coupon to an Order in WooCommerce3

I need to link Google Sheet with my Laravel

Laravel Carbon throws error The format separator does not match

Get orders by date and status woocommerce

Confirm Leave on External Links in Wordpress

Send POST data via raw JSON with Postman

Elastic Beanstalk with Laravel Envoy

MySQL default time format UTC or GMT?

About Contact Privacy policy Terms and conditions