groups

name language licence
JS/GOOGLE MAPS API : tracer un polygone Other Other
JS/HTML/GOOGLE MAPS API : gabarit+js : modèle de départ + bouton pour la vue Earth Other Other
HTACCESS : proteger un repertoire avec une demande d'authentification Other Other
HTACCESS : personnaliser les page d'erreurs Other Other
HTML : select, option : definir la valeur selectionné par defaut avec selected HTML Other
PHP/MYSQL : utilisation orientée objet de mysqli Other Other
HTML :Form upload enctype HTML Other
HTML : Commentaires conditionnels IE6 & IE 7 HTML Other

< 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 >



language: Other
licence: Other

PHP/MYSQL : utilisation orientée objet de mysqli

options: view full snippetsend to code collector
<?php

/* how to create connexion (4th parameter = default database) */
$mysqli = new mysqli($host, $usr, $pass, $db);

/* how to verify connexion */
if (mysqli_connect_errno()) {
    printf("Echec de la connexion : %s\n", mysqli_connect_error());
}

/* how to set the default charset to use */
if (!$mysqli->set_charset("utf8")) {
   printf("Erreur lors du chargement du jeu de caractères utf8 : %s\n", $mysqli->error);
}

	
(Continues...)