rendered paste body<!-- guest.html --!><html><head></head><body> <form action="guest.php" id="insert" method="POST" title="insert a Guestbook entry"> <p>Insert your Name:</p> <input type="text" name="Artist" maxlength="20" id="Artist"> <p>Insert your Text:</p> <textarea id="ientry" cols="20" rows="5" name="Entry"></textarea> <input type="submit" name="subm" value="Send"> </form></body></html><!-- guest.php --!><?php$Artist = $_POST["Artist"];$Entry = $_POST["Entry"];$Submit = $_POST["subm"];function check_Input($Artist, $Entry){ if(empty($Entry) || empty($Artist)) { if(empty($Artist)) { echo "<p>You forgot to insert a Name</p><br />"; } if(empty($Entry)) { echo "<p>You forgot to insert an Entry</p><br />"; } die; } elseif(count($Artist) < 4) { echo "<p>Your name have to few characters</p>"; echo "<p>Need 4 characters</p>"; die; } elseif(count($Entry) < 6) { echo "<p>Your entry have to few characters</p>"; echo "<p>Need 6 characters</p>"; die; } return 0;}function insert_Input($Artist, $Entry){ $FileHandler = fopen("gb.txt", "a"); $Comment = "<tr><td><p>${Artist}</p></td><td><p>${Entry}</p></td></tr>"; fwrite($FileHandler, $Comment);}function show_Entrys(){ if(!is_file("gb.txt")) { echo "<p>No Entrys</p>"; die; } $GetEntrys = file_get_contents("gb.txt"); if(empty($GetEntrys) ) { echo "<p>No Entrys</p>"; die; } echo "<table>"; echo nl2br($GetEntrys); echo "</table>";}if(isset($Submit)){ if(check_Input($Artist, $Entry) == 0) { insert_Input($Artist, $Entry); echo "<p>Your Comment was added successfully</p>"; die; }}else { show_Entrys(); die;}?>