• 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

Problems getting instance of UploadedFile in Yii2

Installing Composer - Internal Error

printing all running session variable in laravel 5.1

mysql slow on updates for a well optimized query

wordpress : How to specify the cause "This site can’t be reached"

PHP drop down list using array's and foreach (else and for) code

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

virtctl works when executed via command line but not from php exec()

PHP: convert all UTF-8 characters to HTML entities

Sentry on Symfony: how to exclude `NotFoundHttpException`

Parsing JSON File to array in PHP

Testing subscription renewals on Stripe

Can't find vendor/autoload.php for Ratchet

Prestashop webservice API creating cart rules

woocommerce get_order_report_data to show order_item_id

About Contact Privacy policy Terms and conditions