• 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

Unit (real unit test) of test laravel relationship

Passing a boolean value from checkbox in Laravel form

PHP/HTML: Creating A SubMenu

merge all files in directory to one text file

Add New Parameter to Existing URL using htaccess

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

how to insert data into select2 search input after scan using qrcode

Zig-zag scan an N x N array

WooCommerce Additional Information - if empty, hide

PHP error: "The zip extension and unzip command are both missing, skipping."

Can't remotely connect to MySQL error (13) with PHP script, connecting through CLI works

Can't find vendor/autoload.php for Ratchet

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

Laravel: Why is my variable not being set while it's in the construct function of the controller?

About Contact Privacy policy Terms and conditions