Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Blad...
-Dobry Duszek Forum-
post 31.07.2003, 05:29:35
Post #1





Goście







Gdzie w tym kodzie lezy blad ?

[php:1:8c4a353293]<?php
<center><B>Dopisz Się:</b><P>
<?
if($form)
{
if( $autor=="" )
$bledy++;
if( $email=="" )
$bledy++;
if( $temat=="" )
$bledy++;
if( $tresc=="" )
$bledy++;

if(!($bledy==""))
echo("<center>Nie wypełniłeś Wszystkich pól !");
else
{
$ip = $_SERVER['REMOTE_ADDR'];
$file=fopen('klicznik.dat', 'r+');
$ile = $fread($file, 50);
$ile++;
fclose($file);

$file=fopen('klicznik.dat', 'w');
fwrite($ile, $file);
fclose($file);

$id = $ile;
$time = time();

$data = date( "d-m-Y", $time );

$zapytanie = "INSERT INTO ksiega(id, ip, email, temat, tresc, autor, data) VALUES($id, $ip, $email, $temat, $tresc, $autor, $data)";
$wykonaj = mysql_query($zapytanie);
echo("Wiadomosc Zostala Dodana !");
}
}
else
{
echo("<center><table class="unnamed1">
<form method=post>
<input type=hidden name=form
<tr><td>Autor: </td><td><input type=text name=autor></td></tR>
<tr><td>Email: </td><td><input type=text name=email></td></tR>
<tr><td>Temat: </td><td><input type=text name=temat></td></tR>
<tr><td>Tresc: </td><td><input type=text name=tresc></td></tR>
<tr><td><center><input type=submit value="Dopisz"></td><td><input type=reset value="Wyczysc"></td></tr>
</table>
</form>");
}
?>[/php:1:8c4a353293]
Go to the top of the page
+Quote Post

Posty w temacie
- Dobry Duszek Forum   Blad...   31.07.2003, 05:29:35
- - zalew   w tym ze w input hidden nie domknales znacznika.. ...   31.07.2003, 05:45:12
- - Dobry Duszek Forum   pomogło... Poprostu niespałem   31.07.2003, 05:59:10


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

 



RSS Wersja Lo-Fi Aktualny czas: 18.07.2025 - 02:32