id smallint(5) unsigned not null auto_increment
temat varchar(200) not null
autor smallint(5) unsigned not null default '1'
miesiac smallint(5) unsigned not null default '0'
tresc text not null
data int(10) unsigned not null default '0'
I mam taki problem: chcę dodać do bazy danych tylko i wyłącznie treść newsa i używam w tym celu takiego kodu:
<?php require_once "../main.php"; ?> <label>Treść:<br> <textarea name="tresc" rows="10" cols="40"> </textarea></label><br> <input type="submit" value="Zapisz"> </form> <?php $trescnewsa = $_POST['tresc']; $sql = "INSERT INTO newsy (tresc) VALUES ('$trescnewsa')"; } else { } } ?>

poprawiam
---
nospor
Mam problem, nie chce się tabela dodawać. Wyświetla Bład podczas dodawania newsa. Co mam źle?