Hey,
habe das Script schon lange bei mir rumfliegen, nur vergessen es Public zu machen =D
Also erstes SQL ausführen:
Und das PHP Script:
Das PHP Script kommt in den Ordner Pages, der SQL Befehl muss auf die Tabelle "account" ausgeführt werden!
Mfg
0x4D617276
habe das Script schon lange bei mir rumfliegen, nur vergessen es Public zu machen =D
Also erstes SQL ausführen:
PHP Code:
DROP TABLE IF EXISTS `bans`;
CREATE TABLE `bans` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Account_Name` char(255) NOT NULL,
`server` int(1) NOT NULL DEFAULT 0,
`Grund` char(255) NOT NULL,
`Dauer` enum('Drei Tage','Eine Woche','Ein Monat','Permanent') NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
Und das PHP Script:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Unbenanntes Dokument</title>
<?php
require("../inc/config.inc.php");
$sql = "SELECT * FROM account.bans WHERE SERVER = '".mysql_real_escape_string($_POST['server'])."';";
$res = mysql_query($sql)
?>
</head>
<body>
<table width="100%" border="1">
<tr>
<th scope="col">Account Name</th>
<th scope="col">Grund des Bans</th>
<th scope="col">Server</th>
<th scope="col">Dauer des Bans</th>
</tr>
<?php
while($bans = mysql_fetch_object($res)){
echo '<tr>
<td>'.$bans->Account_Name.'</td>
<td>'.$bans->Grund.'</td>
<td>'.$bans->server.'</td>
<td>'.$bans->Dauer.'</td>
</tr>';
}
?>
</table>
</body>
</html>
Das PHP Script kommt in den Ordner Pages, der SQL Befehl muss auf die Tabelle "account" ausgeführt werden!
Mfg
0x4D617276