Cod: Selectaţi tot
<?php
include 'cfg.php';
echo '<div style="position:absolute;top:420px;left:22%"><img src="rounded.png"></div>';
echo '<div style="position:absolute;top:560px;left:23%">
<form method=post action="index.php?pagina=d">
Echipa : <input type=text name=echipa height=3><br>
Manager: <input type=text name=manager height=3><br>
Stadion: <input type=text name=stadion height=3><br>
Parola : <input type=text name=parola height=3><br>
Echipament:<input type="radio" name="echipament" value="e1" /><img src="e1.jpg" width=64 height=54><input type="radio" name="echipament" value="e2" /><img src="e2.jpg" width=64 height=54><input type="radio" name="echipament" value="e3" /><img src="e3.jpg" width=64 height=54><input type="radio" name="echipament" value="e4" /><img src="e4.jpg" width=64 height=54><input type="radio" name="echipament" value="e5" /><img src="e5.jpg" width=64 height=54><input type="radio" name="echipament" value="e6" /><img src="e6.jpg" width=64 height=54><input type="radio" name="echipament" value="e7" /><img src="e7.jpg" width=64 height=54><br>
<input type=submit name=submit value=Creaza></form>
</div>';
if(isset($_POST['submit'])) {
$echipa=$_POST['echipa'];
$manager=$_POST['manager'];
$parola=$_POST['parola'];
$echipament=$_POST['echipament'];
$stadion=$_POST['stadion'];
$tabel="CREATE TABLE jucatori (
id int(3) NOT NULL AUTO_INCREMENT,
echipa varchar(20) NOT NULL ,
parola varchar(40) NOT NULL ,
stadion varchar(40) NOT NULL ,
echipament varchar(40) NOT NULL ,
PRIMARY KEY (id)) TYPE=MyISAM";
}
?>
Cod: Selectaţi tot
if(mysql_query($tabel)){
echo "Tabelul a fost creat";
}
else{
echo "Tabelul nu a fost creat";
multumesc