Vous n’êtes pas connecté.
TrOuble
God





|
|
Code source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
<?php
error_reporting(E_ALL);
@mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS) OR
die("Keine Verbindung zur Datenbank. Fehlermeldung:".mysql_error());
mysql_select_db(MYSQL_DATABASE) OR
die("Konnte Datenbank nicht benutzen, Fehlermeldung: ".mysql_error());
$sql = "SELECT
Name,
Mail,
Homepage,
Inhalt,
Datum
FROM
gb
ORDER BY
datum DESC";
$gb = mysql_query($sql) OR die(mysql_error());
echo "<h2>Gästebuch</h2><br \>\n";
echo "Das Gästebuch hat ".mysql_num_rows($gb)." einträge!<br \><br \><br \>\n";
echo "<table width=\"500\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td width=\"92\" bgcolor=\"F0F0F0\">\n";
while($row = mysql_fetch_assoc($gb)) {
echo $row['Name'];
echo "</td>\n";
echo "<td width=\"500\" bgcolor=\"F0F0F0\">²</td>\n";
echo "<td width=\"131\" bgcolor=\"F0F0F0\">\n";
if(trim($row['Mail']) == "") {
echo "<a href=\"mailto:".$row['Mail']."\" target=\"_blank\"></a>\n";
}
else {
echo "<a href=\"mailto:".$row['Mail']."\" target=\"_blank\"><img src=\"images/email.gif\" width=\"17\" hspace=\"0\" vspace=\"0\" ></a>\n";
}
if(trim($row['Homepage']) == "") {
echo "<a href=\"".$row['Homepage']."\" target=\"_blank\"></a>\n";
}
else {
echo "<a href=\"http://".$row['Homepage']."\" target=\"_blank\"><img src=\"images/home.gif\" width=\"17\" hspace=\"0\" vspace=\"0\" ></a>\n";
}
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td bgcolor=\"F0F0F0\">²</td>\n";
echo "<td>\n";
echo $row['Inhalt'];
echo "</td>\n";
echo "<td>²</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td bgcolor=\"F0F0F0\">²</td>\n";
echo "<td bgcolor=\"F0F0F0\">²</td>\n";
echo "<td bgcolor=\"F0F0F0\">".$row['Datum']."</a> </td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br \>\n";
echo "<p></p>\n";
}
?>
<br>
<br>
<form name="form1" method="post" action="main.php?page=gb_post">
<table width="500" border="0" align="center">
<tr>
<td width="90">Name:</td>
<td><input type="text" name="Name" class="page"></td>
</tr>
<tr valign="top">
<td>Kommentar:</td>
<td><textarea name="Inhalt" rows="3" cols="40" class="page"></textarea></td>
</tr>
<tr>
<td>Homepage:</td>
<td><input type="text" name="Homepage" class="page"></td>
</tr>
<tr>
<td>eMail:</td>
<td><input type="text" name="Mail" class="page"></td>
</tr>
<tr>
<td>²</td>
<td><input type="submit" name="Submit" value="Senden"></td>
</tr>
</table>
</form>
|
TrOuble
God





Citation de "TheCrow"
mmh... ich kann dir zwar nich direkt helfen, aber wenn ich auf deinen link klicke is alles durcheinander (wie schon gesagt) aber wenn ich im menü auf guestbook klicke werden die posts untereinander angezeigt :-/
cu



|
|
Code source |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
<?php
error_reporting(E_ALL);
@mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS) OR
die("Keine Verbindung zur Datenbank. Fehlermeldung:".mysql_error());
mysql_select_db(MYSQL_DATABASE) OR
die("Konnte Datenbank nicht benutzen, Fehlermeldung: ".mysql_error());
$sql = "SELECT
Name,
Mail,
Homepage,
Inhalt,
Datum
FROM
gb
ORDER BY
datum DESC";
$gb = mysql_query($sql) OR die(mysql_error());
echo "<h2>Gästebuch</h2><br \>\n";
echo "Das Gästebuch hat ".mysql_num_rows($gb)." einträge!<br \><br \><br \>\n";
echo "<table width=\"500\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n";
while($row = mysql_fetch_assoc($gb)) {
echo "<tr>\n";
echo "<td width=\"92\" bgcolor=\"F0F0F0\">\n";
echo $row['Name'];
echo "</td>\n";
echo "<td width=\"500\" bgcolor=\"F0F0F0\">²</td>\n";
echo "<td width=\"131\" bgcolor=\"F0F0F0\">\n";
if(trim($row['Mail']) == "") {
echo "<a href=\"mailto:".$row['Mail']."\" target=\"_blank\"></a>\n";
}
else {
echo "<a href=\"mailto:".$row['Mail']."\" target=\"_blank\"><img src=\"images/email.gif\" width=\"17\" hspace=\"0\" vspace=\"0\" ></a>\n";
}
if(trim($row['Homepage']) == "") {
echo "<a href=\"".$row['Homepage']."\" target=\"_blank\"></a>\n";
}
else {
echo "<a href=\"[url]http://".$row['Homepage']."\"[/url] target=\"_blank\"><img src=\"images/home.gif\" width=\"17\" hspace=\"0\" vspace=\"0\" ></a>\n";
}
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td bgcolor=\"F0F0F0\">²</td>\n";
echo "<td>\n";
echo $row['Inhalt'];
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td bgcolor=\"F0F0F0\">²</td>\n";
echo "<td bgcolor=\"F0F0F0\">²</td>\n";
echo "<td bgcolor=\"F0F0F0\">".$row['Datum']."</a> </td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<br \>\n";
}
?>
<br>
<br>
<form name="form1" method="post" action="main.php?page=gb_post">
<table width="500" border="0" align="center">
<tr>
<td width="90">Name:</td>
<td><input type="text" name="Name" class="page"></td>
</tr>
<tr valign="top">
<td>Kommentar:</td>
<td><textarea name="Inhalt" rows="3" cols="40" class="page"></textarea></td>
</tr>
<tr>
<td>Homepage:</td>
<td><input type="text" name="Homepage" class="page"></td>
</tr>
<tr>
<td>eMail:</td>
<td><input type="text" name="Mail" class="page"></td>
</tr>
<tr>
<td>²</td>
<td><input type="submit" name="Submit" value="Senden"></td>
</tr>
</table>
</form>
|
;D ;D ;D-