Hello!
I need help with my guestbook code. I want to link to the page, where the guestbook actually is. You write all the info on one page. and then gets redirected to the guestbook. now i need a “button” that just shows the guestbook… much easyer to just show the code and explain whats happening
[php]
<html>
<head>
<title>Fælles Forum</title>
</head>
<body>
<form action="skriv.php" method="POST">
<br>
Navn <input type="text" name="fornavn" />
<br>
<br>
E_mail <input type="text" name="email" />
<br>
<br>
<p>Besked<p> <textarea rows="7" name="kommentar" cols="40"></textarea>
<br>
<br>
Adresse <input type="text" "Adreese" name="adresse" />
<br>
<br>
Mobil nr <input type="text" name="mobil" size="12" maxlength="8"
<br>
<br>
<br>
<input type="submit" value="Save" />
<input type="reset" value="reset" />
<form action="skriv.php" method="GET">
<INPUT TYPE="submit" VALUE="Read all messages"> // This is where i need to make it link to the guestbook.
</form>
<FORM METHOD="GET" ACTION="Login.php"> <INPUT TYPE="submit" VALUE="Logout"> </FORM>
<form action="index.php" method="GET">
<input type="submit" value="Delete all messages" name = "delete">
</form>
<?php
if (isset($_GET['delete']))
{
$handle = fopen("TXTfil.txt", "w");
fclose($handle);
echo "Alle kommentare slettet!";
}
?>
</body>
</html>
[/php]
[php]
// This is where i need to make it link to the guestbook.
[/php]
The problem is that it comes up with an error, because ive said that, if the name, and comment, is empty then… error. But it should not do the same as the “save” button.
here is the other code - Some of it is in danish
[php]
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<Title>Fælles forum</title>
<h1>Fælles Forum</h1>
</head>
<?php
$dato=date(“d F Y H:i:s A”);
$fornavn = $_POST[“fornavn”];
$email = $_POST[“email”];
$kommentar = $_POST[“kommentar”];
$adresse = $_POST[“adresse”];
$mobil = $_POST[“mobil”];
$fil = fopen(“TXTfil.txt”, “a+”) or exit(“fejl”);
fwrite ($fil, $dato."\n". $fornavn."\n".$email."\n".$kommentar."\n".$adresse."\n".$mobil."\n"."\n");
fclose($fil);
?>
<?php
$fil = fopen("TXTfil.txt", "r") or exit("fejl");
while(!feof($fil)) {
echo fgets($fil) ."<br/>";
}
fclose($fil);
?>
<FORM>
[/php]
Hope you can understand what i mean 
The problem remains, along with the others