Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Mały problem z odświeżaniem w php, Funkcja odświeżania w skrypcie
Rafael6666
post
Post #1





Grupa: Zarejestrowani
Postów: 95
Pomógł: 0
Dołączył: 20.10.2006

Ostrzeżenie: (10%)
X----


Witam. Mam skrypt wygryzanko, ale mam jeden problem. Chcę, aby po wypełnieniu formularza (Adres strony, Opis) odświeżał się skrypt i, żeby wyświetlały się świeże dane. To chyba mały problem, ale ja nigdy nie bawiłem się z takim czymś. Jak ktoś wie jak to zrobić, to bardzo proszę o pomoc.

A tu daję kod:

Kod
<LINK REL=stylesheet HREF="style.css" TYPE="text/css">
<center><?php
$file="wpis.txt";
$fd = fopen ("$file", "r");
$dane = fread ($fd, filesize ("$file"));
$tmp=explode("|",$dane);
echo "<a href='$tmp[0]'>$tmp[1]</a>";
echo "
<form method='post' action=''>
<fieldset style='border:0px;'>
<input type='hidden' name='wygr' value='tak'>
<input type='text' name='link' style='width: 100px' value='http://'>
<input type='text' name='opis' style='width: 100px' maxlength='50' value='Opis'>
<input type='submit' name='submit' value='OK'>
</fieldset>
</form>";
if ($wygr == 'tak') {
if ($opis != 'Opis') {
if ($opis != '') {
$file="wpis.txt";
$fp = fopen($file, "w");
flock($fp, 2);
$k = '|';
fwrite($fp, "$link $k $opis $k");
flock($fp, 3);
fclose($fp);
}
else die();
}
else die();
}
?></center>
Go to the top of the page
+Quote Post

Posty w temacie


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: 22.12.2025 - 18:34