Może ktoś z forum będzie w stanie pomóc?
plik comment.php
Dodaj wpis do księgi gości<br> <hr><br> <div id = "formularz"> <form action="index.php?id=9" method="post"> <p>Podaj swój nick: <input type="text" name="name" maxlength="50" class="input"></p> <input name="email" maxlength="50" class="input1"></p> <p>Treść wpisu:<br> <textarea name="entry" cols="70" rows="6"></textarea></p> <input style="margin : 10px 0 0 300px;" type="submit" name="submit" value="Dodaj wpis do księgi"> </form> </div> <br><hr>
plik add_comment.php
<?php $msg = NULL; $name = FALSE; $msg .= '<p>Nie podałeś imenia!</p>'; } else { $name = $_POST['name']; } $email = FALSE; } else { $name = $_POST['email']; } $entry = FALSE; $msg .= '<p>Nie podałeś treści wpisu!</p>'; } else { $entry = $_POST['entry']; } } if ($name && $entry) { $query = "INSERT INTO entries (name, email, entry_text, entry_date) VALUES ('$name', '$email', '$entry', '$when')"; } else { } ?>