Wiadomości w karczmie się poprostu nie wyświetlają nie ma żadnego błędu ani nic
Kod php:
<?php
header ('Content-type: text/html; charset=utf-8');
include('baza.php');
if(isSet($_POST['tresc']) && isSet($_POST['wyslij']) && !empty($_POST['tresc'])){
$tekst = $_POST['tresc'];
mysql_query("INSERT INTO karczma SET user='$user', text='$tekst'");
header("Location: karczma.php");
}
else{
include('gora.php');
echo "Tutaj możesz sobie porozmawiać." . "<br><br>";
$wszystkie = mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM karczma"));
$ile = $wszystkie[0];
$ile2 = $ile - ($ile - 10);
?>
<div>
<?php
while($ile2){
$text = mysql_fetch_row(mysql_query("SELECT * FROM karczma WHERE id='$ile' "));
echo "<b>" . $text[1] . "</b>" . "<br>" . $text[2];
$ile--;
$ile2--;
echo "<br><br>";
}
?>
</div>
<table>
<form action="karczma.php" method="post">
<tr>
<td><input size="70" type="text" name="tresc"></td>
<td><input type="submit" name="wyslij" value="Wy¶lij"></td>
</tr>
</form>
</table>
<?php
}
include('dol.php');
?>
Zakładki