• 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 get the ID of the link in another page in php

"cannot list resources" error from WooCommerce REST API

How do I call a php file with axios?

Laravel/docker-compose/redis - Class 'Redis' not found

Dropdown with current value from Mysql

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

How can I get a div content in php

php curl requesting twice

How to remove from a multidimensional array all duplicate elements including the original?

PHP web3 ERC20 token function call

Project structure for PHP

php 7 php.ini upload_max_filesize not working

Warning: sqlite_query() expects parameter 1 to be resource, string given

How to implement placeholder in a php file for moodle plugin?

Querying only one row from a one to many relationship laravel

About Contact Privacy policy Terms and conditions