• 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

get attribute from class not working php 7

Converting alphabet letter to alphabet position in PHP [duplicate]

CONCAT columns with Laravel 5 eloquent

Can't exclude directories from .htaccess mobile redirect?

Backend cannot be reached after Typo3 login screen

How to loop a tree array with unknown depth and get array blocks?

PHP contact form configuration [duplicate]

How to delete old images from public folder on update using Laravel

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

Cant seem to get the Pagination to work on my WooCommerce REST API application?

Unable to Edit config.inc.php

How to override htaccees file for cache control header

Mysqli Output to a table

Group data in a multidimensional array based on two columns

Reading input in php from terminal

About Contact Privacy policy Terms and conditions