Ich bekomme folgenden fehler:
Warning: Wrong parameter count for mysql_select_db() in C:\wampp2\htdocs\fomod\index.php on line 21
2 >>> MySQL-Error: ->
Weiß jemand woran das liegt?
Warning: Wrong parameter count for mysql_select_db() in C:\wampp2\htdocs\fomod\index.php on line 21
2 >>> MySQL-Error: ->
Weiß jemand woran das liegt?
PHP-Code:
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="css/f.css">
</head>
<body>
<table>
<tr>
<td>Home Registrieren</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<?
$host = "localhost";
$user = "root";
$pass = "";
$db = "dbforen";
if(mysql_select_db($db, $host, $user, $pass))
{
$sql = "SELECT forum, shortdes, mods FROM foren";
$result = mysql_query($sql) or print ">>> MySQL-Error: ".mysql_errno()." -> ".mysql_error()."\n";
if (($myrow = mysql_fetch_array($result)))
{
?>
<table>
<?
do
{
echo "<tr><td>" . $zeile["forum"] . "</td><td>" . $zeile["shortdes"] . "</td><td>" . $zeile["mods"] . "</td>\n";
}
while(($myrow = mysql_fetch_array($result)));
}
else
{
echo "<tr><td>Ein Fehler ist aufgetreten...</td></tr><br>\n";
print ">>> MySQL-Error: ".mysql_errno()." -> ".mysql_error()."<br>\n";
}
}
else
{
echo "2\n";
print ">>> MySQL-Error: ".mysql_errno()." -> ".mysql_error()."<br>\n";
}
?>
</table>
</td>
</tr>
</table>
</body>
</table>
Kommentar