This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//fonction pour ce connecter à une base de donnée en utilisant la methode PDO | |
function db() | |
{ | |
$db = 'nom_de_la_base_de_donne'; | |
$user_ = 'nom_d_utilisateur'; | |
$pass = 'mot_de_passe'; | |
$host = 'localhost'; | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @param string $val | |
* @return bool | |
*/ | |
function checkIsValidLuhn($val) | |
{ | |
$i = 0; | |
$arr = str_split($val); |