<?php
header("Content-type: text/html; charset=utf-8");

include("bazadb.php");		// Include fisierul pt. conectare-selectare baza de date

// Creaza tabelul utilizatori
$sql = "CREATE TABLE `utilizatori` (nume VARCHAR(32), parola VARCHAR(32), email VARCHAR(45), aprobat DECIMAL(1,0) DEFAULT 0, ip VARCHAR(18), data VARCHAR(32), pass VARCHAR(18), id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY) CHARACTER SET utf8 COLLATE utf8_general_ci"; 
if (mysql_query($sql))
    echo '<br /><br /><br /><center><h4>Tabelul <u>utilizatori</u> a fost creat.</h4></center><br />'; 
else 
  echo '<br /><br /><br /><center><h4>Tabelul <u>utilizatori</u> nu a putut fi creat deoarece - '. mysql_errno(). ' : '. mysql_error(). '</h4></center>'; 

// Creaza tabelul user_temp
$sql2 = "CREATE TABLE `user_temp` (nume VARCHAR(32), incercari DECIMAL(1,0) DEFAULT 0, ip VARCHAR(18), data VARCHAR(32), id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY) CHARACTER SET utf8 COLLATE utf8_general_ci"; 
if (mysql_query($sql2))
    echo '<br /><br /><br /><center><h4>Tabelul <u>user_temp</u> a fost creat.</h4></center><br />'; 
else 
  echo '<br /><br /><br /><center><h4>Tabelul <u>user_temp</u> nu a putut fi creat deoarece - '. mysql_errno(). ' : '. mysql_error(). '</h4></center>'; 
  
mysql_close(); 
?>