<?php
$db_host="127.0.0.1";	// PARAMETERS OF THE DB
$db_user="username";
$db_pass="password";
$database="database_name";

mysql_connect($db_host,$db_user,$db_pass) or die("Unable to connect to database");
mysql_select_db($database) or die( "Unable to select database");

$query ="CREATE TABLE iplog (
id int NOT NULL auto_increment,

IP varchar(15) NOT NULL,
heure int NOT NULL,

PRIMARY KEY (id),
UNIQUE id (id),
KEY id_2 (id))";

if (false==mysql_query($query))echo 'Error : '.mysql_error();else echo 'Table succesfully created';
mysql_close();
?>