Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Edycja news'a
tumdum
post
Post #1





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 12.04.2003

Ostrzeżenie: (0%)
-----


[php:1:7a5d6e65ab]<?php
if ($what == 'del') {
$wynik = mysql_query ("DELETE FROM news WHERE nr = '$nr';");
}
elseif ($what == 'edited') {
$query = "UPDATE `news` SET `tytul` = '$title', `tresc_krotka` = '$short', `tresc` = '$long' WHERE `nr` = '4';";
$wynik = mysql_query ($query);
$where = null;
}
elseif ($what == 'edit' ) {
$wynik = mysql_query ("SELECT * FROM news WHERE nr = '$nr';");
$rekord = mysql_fetch_array ($wynik);
$date = $rekord[1];
$title = $rekord[2];
$short = $rekord[3];
$long = $rekord[4];
$author = $rekord[5];
print '<FORM METHOD="POST">';
print '<INPUT TYPE="hidden" NAME="co" VALUE="edited">';
print '<INPUT TYPE="hidden" NAME="nr" VALUE="' . $nr . '">';
print '<p class=log><br>Title:<br><INPUT TYPE="text" NAME="title" VALUE="' . $title . '" size="81"><br><br>';
print 'Short:<br><textarea name="short" cols="60" rows="5">' . $short . '</textarea><br><br>';
print 'Long:<br><textarea name="long" cols="60" rows="10">' . $long . '</textarea>';
print '<br><input type="submit" value="OK"></form>';

}
}


?>[/php:1:7a5d6e65ab]

Nie wiem czemu ale nie dziala mi czesc do edycji (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
HELP!!

?>[/php]
Go to the top of the page
+Quote Post

Posty w temacie
- tumdum   Edycja news'a   21.06.2003, 10:53:20
- - KaMeLeOn   Re: Edycja news'a   21.06.2003, 10:56:09
- - kwiateek   Re: Edycja news'a   21.06.2003, 12:01:23
- - KaMeLeOn   Re: Edycja news'a   21.06.2003, 12:07:41
- - tumdum   Pomogło coś takiego: <?php print '<FORM METH...   21.06.2003, 21:05:32
- - KaMeLeOn   CytatPomogło coś takiego [...] Czy Pan kwiateek to...   22.06.2003, 02:39:21
- - lisu   Re: Edycja news'a   22.06.2003, 08:14:10


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.12.2025 - 06:31