<?php $mysqlcon=mysql_connect("localhost", "usi2011", "usi2011"); $res=mysql_select_db("usi2011"); if ( ! is_resource($mysqlcon) || $res !== true) { //header 400, Erreur connexion SQL echo "Erreur connexion SQL\n"; exit(); } ?>