Gegen Bilderklau - Das Original (https://www.gegen-bilderklau.net/index.php)
- Design, Website, Copyright (https://www.gegen-bilderklau.net/board.php?boardid=80)
--- Homepagehilfe (https://www.gegen-bilderklau.net/board.php?boardid=27)
---- Homepagehilfe - Archiv (https://www.gegen-bilderklau.net/board.php?boardid=139)
----- [PHP & MySQL] Php-Gästebuch (https://www.gegen-bilderklau.net/thread.php?threadid=117377)


Geschrieben von ShivaChewy am 02.09.2007 um 16:37:

Fragezeichen Php-Gästebuch

Huhu Augenzwinkern

Ist hier einer so lieb und würde mir bei meinem PHP-Gästebuch helfen, bzw. ein neues Coden?
Das Gästebuch ist auf der Seite http://doggypictures.do.funpic.de/Design.htm ,
Irgendwie ist das ein wenig merkwürdig, wie man bei den Einträgen sieht...



Geschrieben von Stelo am 02.09.2007 um 17:26:

 

Was genau ist denn jetzt dein Problem?



Geschrieben von ShivaChewy am 02.09.2007 um 18:42:

 

Einmal ist da ein leerer Kasten, der unterste, und außerdem ist immer nur der neueste Beitrag in Verdana.
Irgendwie ist das alles ein bisschen merkwürdig...
Soll ich euch mal die Codes geben?



Geschrieben von Stelo am 02.09.2007 um 18:43:

 

Ja, die Codes wären da sehr nützlich! smile



Geschrieben von ShivaChewy am 02.09.2007 um 19:08:

 

Einmal von gaestebuch.php

code:
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:
<html><head><style type="text/css"><!--A:hover{background-color:#848B74;color:#000000;text-decoration:none; position: relative; top: 1; left: 1;}--><style type="text/css">
<!--
A:link {text-decoration: none; }
A:visited {text-decoration: none; }
A:hover {color: #848B74;text-decoration: none;}
A:active {text-decoration: none; }
//-->
</style><style type="text/css"><!--body{cursor:crosshair};a:hover{cursor:crosshair;}--></style> </style></head><body bgcolor=#D5E1BB>
<style type="text/css"><!--  
      BODY {  
      scrollbar-base-color: #000000;  
      scrollbar-track-color: #D5E1BB;  
      scrollbar-face-color: #D5E1BB;  
      scrollbar-highlight-color: #D5E1BB;  
      scrollbar-3d-light-color: #000000;  
      scrollbar-darkshadow-color: #D5E1BB;  
      scrollbar-shadow-color: #000000;  
      scrollbar-arrow-color: #000000;  
      }  
      --></style>
<title>Doggy Pictures - Gästebuch</title>
<link href="/style.css" type="text/css" rel="stylesheet">
</head>
<p><FONT face=Verdana size=2>
 
<form action="neuerbeitrag.php" Method="post">
<b>Gästebuch</b><br>
Dies ist das Gästebuch von Doggy Pictures.<br>Über Einträge würde ich mich sehr freuen.
<p>Name:<br>
<input name="Name" size="20"><br><br>
 
E-Mail:<br>
<input name="EMail" size="20"><br>
<br>
 
Inhalt:<br>
<textarea name="inhalt" cols="60" rows="5"
wrap="physical"></textarea><br>
<input type="submit" value="Absenden">
</form>
<hr width="500" color="#FFFFFF">
 
<?php
$beitrag = file("gaestebuch.txt");
krsort($beitrag);
 
foreach($beitrag as $ausgabe)
   {
   $ausgabe = stripslashes($ausgabe);
   $zerlegen = explode("|", $ausgabe);
 
   echo "
   <table align="center"
    border="1" cellspacing="0"
   cellpadding="5" bordercolorlight="black"
   bordercolordark="black" width="50%">
   <tr>
   <td>
  Von <a href="mailto:$zerlegen[0]">$zerlegen[1]</a>
  am $zerlegen[2]
   </td>
   </tr>
 
   <tr>
   <td>
   $zerlegen[3]
   </td>
   </tr>
   </table><br></FONT>
   ";
   }
?>



Und neuerbeitrag.php

code:
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:
<html>
<head>
<title>Gästebuch</title>
<link href="/style.css" type="text/css" rel="stylesheet">
</head>
<body><FONT face=Verdana size=2>
 
<?php
$user = $_POST["Name"];
$user = htmlentities($user);
 
$inhalt = $_POST["inhalt"];
$inhalt = htmlentities($inhalt);
$inhalt = str_replace("\n", "<br>", $inhalt);
 
$email = $_POST["EMail"];
$email = htmlentities($email);
 
if ($inhalt == "" or $user == "")
   {
   echo "Sie müssen das Feld "Namen"
   und "Bericht" ausfüllen";
   }
 
else
   {
   $datum= date("d.m.Y H:i:s");
 
   $eintrag="$email|$user|$datum|$inhalt";
 
   $datei = fopen("gaestebuch.txt", "a");
   fwrite($datei, "\n".$eintrag);
   fclose($datei);
 
   echo "<p>Dein Eintrag wurde hinzugefügt";
   }
?>
 
<br>
<a href="gaestebuch.php">Zurück</a></FONT>
</body>
</html>


Forensoftware: Burning Board, entwickelt von WoltLab GmbH