<? include('../naglowek.php'); ?> <div id="tytul"><p><br><strong>Edytuj newsa</strong></p></div> <? require('../funkcje/db_connect.php'); if($_GET) { $newsid=$_GET['newsid']; $sql="SELECT autor,tytul,tresc FROM newsy WHERE id=$newsid;"; { $pobranyautor=$result['autor']; $pobranytytul=$result['tytul']; $pobranatresc=$result['tresc']; } } if($_POST) { $title=$_POST['tytul']; $text=$_POST['tekst']; $author=$_POST['autor']; $sql='UPDATE newsy SET autor="'.$author.'",tytul="'.$title.'",tresc="'.$text.'";'; } ?> <div id="news"><br> <p>Tytuł newsa:<br> <p>Treść newsa:<br> <p>Autor:<br> <div id="status"><br><p><input type="reset" value="Wyczyść"> <? ?><input type="submit" value="Wyślij"></div> </form> <? include('../menu.php'); include('../stopka.php'); ?>
Działa tylko ze zle zapisuje, tzn pod wszystkie inne newsy a nie aktulanie zmieniany
Pomozcie