<?php
require('conn.php');
if (isset($_POST['title']) and isset($_POST['tresc']) )
{
$title = $_POST['title'];
$tresc = $_POST['tresc'];
$zapytanie="INSERT INTO notki (title,tresc,adder) VALUES('$title','$tresc','ghost')";
mysql_query($zapytanie) or die("Wystpi bd" );
$zapytanie2="Select max(id) from notki";
$idzapytania2 = mysql_query($zapytanie2) or die(mysql_error());
while($wiersz = mysql_fetch_row($idzapytania2)){
$id = $wiersz[0];
}
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="style.css" />
Notka zostaa dodana
';
}
else{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="pl" lang="pl">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
<link rel="stylesheet" type="text/css" href="style.css" />
<form action="add.php" method="POST">
<input type="submit" value="Wyslij Notatke" />
<img src="http://www.darmowe-liczniki.web-tools.pl/licznik-68-61355-stat.png"/>
<?php
}
?>
Co zrobić żeby nie kszaczkowalo mi ?