Autor Zpráva
Tata
Profil
Na dopĺňanie údajov mám urobenú stránku:

<? if($show) {
$subor = "subor.dat";
$wpolozka = "
<table width=\"425\" $table>
<tr><td $label>$nazov</td></tr>
<tr><td>$text</td></tr>
</table>";
$write = "$wpolozka";
if (File_Exists ($subor)) {
$fp = FOpen ($subor, "r");
FClose($fp);
}
$fp = FOpen ($subor, "a+");
FWrite ($fp, $write.$data);
FClose ($fp);
}

if($del) {
$subor = "subor.dat";
if (File_Exists ($subor)) {
$fp = FOpen ($subor, "w");
FWrite ($fp, $write.$data);
FClose ($fp);
}
}
?>
<?
include("subor.dat");
?>

<form action="" method="post">
<table width="425" border=0>
<tr><td><label>Názov:</label>&nbsp;<input name="nazov" size="55"></td></tr>
<tr><td><textarea cols="50" rows="5" name="text"></textarea></td></tr>
<tr>
<td>
<input type="submit" name="show" value="Prida»">
<input type="submit" name="del" value="Vymaza»">
<input type="button" name="koniec" value="Koniec">
<!-- zatial to riesim takto, ale nie je to ono, chcel by som tam "button" -->
<a href="publikacie.php">UKONCIT</a>
</td>
</tr>
</table>
</form>

Ako má vyzera» script pre "koniec" - malo by to zatvori» stránku s formulárom a načíta» namiesto toho napr. súbor subor.php:

<?
$subor = "subor.dat";
if (File_Exists ($subor))
include "subor.dat";
else
echo "blablabla";
?>
Tata
Profil
Nikto nič? Alebo sa to nedá? To snáď nie! Poraďte, prosím.
Acci
Profil
header('Location: soubor.php');

Pokud jsem to pochopil správně...
Tata
Profil
Acci
Vloľil som to takto, ale nefachčí to.

if($end) {
header('Location: subor.php');
}
?>
<?
include("subor.dat");
?>

<form action="" method="post">
<table width="425" border=0>
<tr><td><label>Názov:</label>&nbsp;<input name="nazov" size="55"></td></tr>
<tr><td><textarea cols="50" rows="5" name="text"></textarea></td></tr>
<tr>
<td>
<input type="submit" name="show" value="Prida»">
<input type="submit" name="del" value="Vymaza»">
<input type="button" name="end" value="Koniec">
<!-- zatial to riesim takto -->
<a href="obstaravanie.php">UKONCIT</a>
</td>
</tr>
</table>
</form>
Toto téma je uzamčeno. Odpověď nelze zaslat.