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>
<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>