• 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

Elastic Beanstalk with Laravel Envoy

SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'column_name' in Laravel

Check if a string contain multiple specific words

Make Shipping Method fields Mandatory on Woocommerce checkout page

renameColumn migration fails for existing column with columns does not exist error

Transpose and flatten multiple rows of array data [duplicate]

sqlsrv_num_rows() expects parameter 1 to be resource, boolean given

Pass an image through AJAX [duplicate]

Fatal error: Trait 'LaminasDbAdapterLaminasDbAdapterAdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

How To Access A Column In M-M Relationship Table In Laravel

How do I call Validator from a namespace with an already existing Validator class

How to get unique slug to same post-title for other time too?

PHP -> Next nearest date defined by array of days in week

CodeIgniter force_download is not working

MySQL - Connection failed: No route to host

About Contact Privacy policy Terms and conditions