Witam , niestety jestem posiadaczem takiego problemu :/
<html>
<head>
<title>Test Strona</title>
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-2" />
<link href="style.css" rel="stylesheet" type="text/css">
<body bgcolor="gray">
<?php
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$db = "mysql_tut";
$query = "SELECT * FROM people";
$nextWeek = time() + (7
* 24
* 60
* 60
); {
echo "<tr><td><p class=\"id\"><b>" . $person['ID'] . "Dodał :</b></td></p><td><p class=\"name\"><b>" . $person['Name'] . "</b></p></td><td><p class=\"name\">" . date('Y-m-d') . "</td></tr>"; echo "<tr><td colspan=3><p class=\"di\"> " . $person['Message'] . "</p><hr width=165 align=\"left\" color=white></td></tr>";
}
?>
</br></br><p class="tresc">Witaj w księdze gosci!</p>
<form action="index.php" method="post">
<table>
<tr><td><p class="name">Nick :</p></td>
<td><input type="text" name="InputName"></td>
<tr><td><p class="name">Wiadomosc :</p></td>
<td><input type="text" name="InputMess"></td>
<tr><td></td><td><input type="submit" name="send" value="Wyslij">
<input type="reset" value="Reset">
<input type="submit" name="usun" value="Usun"></td>
</table>
</form>
<?php
$name = $_POST['InputName'];
$mess = $_POST['InputMess'];
if(!$_POST['send'])
{
echo "<p class=false>Wypełnij formularz proszę!</p>"; echo " <a href=index.php>Odswież</a>"; }
else
{
mysql_query ("INSERT INTO people (`ID`,`Name`,`Message`) echo "<p class=true>Wiadomosć została wysłana pomyslnie!</p>"; echo "<a href=\"index.php\">Odswiez</a>"; }
if($_POST['usun'])
{
}
?>
</body>
</html>
teraz wiem ze to dobry zapis i nic ;/
Ten post edytował dizek 23.05.2011, 13:04:20