ircwar.php:
add.php:
Wenn jmd. durchblickt und mir helfen könnte wäre ganz net, und beim connecten zur Database, was ist xxx1 und xx2 genau?
MFg Markus
PHP-Code:
<?
mysql_connect("localhost","xxx1","xxx2") or die ("Keine Verbindung moeglich");
mysql_select_db("usr_web48_1") or die ("Die Datenbank existiert nicht");
$user = $HTTP_POST_VARS["user"];
$liga = $HTTP_POST_VARS["liga"];
$comment = $HTTP_POST_VARS["comment"];
$commander = $HTTP_POST_VARS["commander"];
$eintrag = "INSERT INTO links (user, liga, comment, commander)
VALUES ('$user', '$liga', '$comment', '$commander')";
$eintragen = mysql_query($eintrag);
$abfrage = "SELECT * FROM links";
$ergebnis = mysql_query($abfrage);
$abfrage = "SELECT user, liga, comment, commander FROM ircwar";
$ergebnis = mysql_query($abfrage);
while($row = mysql_fetch_object($ergebnis))
{
echo $row->user, liga, commander;
}
?>
PHP-Code:
<html>
<head>
<link rel="stylesheet" href="css.css" type="text/css">
</head>
<body bgcolor="#676E76">
<table width="95%">
<tr>
<td>
<form action="ircwar.php" method="post">
<div align="center">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Nick:</td>
<td>
<div align="center">
<input type="text" name="user" size="24" border="0"></div>
</td>
</tr>
<tr>
<td>Zeit:</td>
<td>
<div align="center">
Wars werden immer um 20.00 Uhr gespielt!</div>
</td>
</tr>
<tr>
<td>Art:</td>
<td>
<div align="center">
<select name="liga" size="1">
<option>team-ozc.train</option>
<option>team-ozc.esl</option>
<option>team-ozc.irc</option>
<option>team-ozc.cw</option>
</select></div>
</td>
</tr>
<tr>
<td>Würdest du Gegner holen?:</td>
<td>
<div align="center">
<select name="commander" size="1">
<option>ja</option>
<option>nein</option>
</select></div>
</td>
</tr>
<tr>
<td colspan="2">
<div align="center">
<input type="reset" border="0" value="reset">
<input type="submit" value="ok" border="0"></div>
</td>
</tr>
</table>
</div>
</form>
</td>
</tr>
</table>
</div>
</body>
</html>
MFg Markus
EDIT:
Umbruch by TobiaZ
Kommentar