• 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 can I create a Download Page with post php method?

Laravel Nova Dependency Container what are the allowed resource properties other than id in dependsOn

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

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

Using spatie/media-library, how to rename a collection of uploaded files?

merging two arrays with specified index

Form Validation and Submission to database

Normalize DateInterval in PHP

sort() not affecting original array while inside foreach loop

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

if statement inside concatenation

Populate Dynamic Dropdowns List in Codeigniter

dompdf and img tag, image wont show

How to remove Deprecated SymfonyComponentDebugDebugClassLoader?

What is the function of the (new Date()).getTime() in PHP?

About Contact Privacy policy Terms and conditions