• 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 to execute sql code based on fetch array

Destroy session upon refresh

How to use React Router with Laravel?

How to redirect to another page and call a Function there on Angular ng-click

The sum of the user's points

how to prevent float variables displaying as scientific notation when printing [duplicate]

Yii2 select2 database exception number of bound variables does not match number of tokens

Laravel print last executed SQL query with Query log

Is there a way to use Foundry Model for Authentification inside Functional Tests?

find in set in laravel ? example

Detect emoticons in string

Laravel Carbon throws error The format separator does not match

Shortcode or PHP inside a shortcode in Wordpress

Laravel Route issues with Route order in web.php

Implode columnar values between two arrays into a flat array of concatenated strings

About Contact Privacy policy Terms and conditions