index.php
Kod
<BR><html><BR><head><BR> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" /><BR></head><BR><body></P> <P><?<BR>echo ("<form action=wpis.php method=post>
");<BR>echo ("Imie:");<BR>echo ("<input type=text name=imie value=>
");<BR>echo ("E-mail:");<BR>echo ("<input type=text name=mail value=>
");<BR>echo ("Tresc:");<BR>echo ("<textarea name=tresc rows=10 cols=40></textarea>
");<BR>echo ("<input type=submit value=wyslij>");<BR>echo ("</form>");<BR>?></P> <P></form><BR></body><BR></html><BR>
");<BR>echo ("Imie:");<BR>echo ("<input type=text name=imie value=>
");<BR>echo ("E-mail:");<BR>echo ("<input type=text name=mail value=>
");<BR>echo ("Tresc:");<BR>echo ("<textarea name=tresc rows=10 cols=40></textarea>
");<BR>echo ("<input type=submit value=wyslij>");<BR>echo ("</form>");<BR>?></P> <P></form><BR></body><BR></html><BR>
wpis.php
Kod
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />
<meta http-equiv="refresh" content="3;URL=odczyt.php">
</head>
<body>
<?
$imie=$__POST['imie'];
$mail=$__POST['mail'];
$tresc=$__POST['tresc'];
$asd= $imie.$mail.$tresc;
echo ("$asd");
$file=fopen("plik.txt", "w");
fwrite($file, $asd, 999);
fclose($file);
?>
</body>
</html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />
<meta http-equiv="refresh" content="3;URL=odczyt.php">
</head>
<body>
<?
$imie=$__POST['imie'];
$mail=$__POST['mail'];
$tresc=$__POST['tresc'];
$asd= $imie.$mail.$tresc;
echo ("$asd");
$file=fopen("plik.txt", "w");
fwrite($file, $asd, 999);
fclose($file);
?>
</body>
</html>
odczyt.php
Kod
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />
</head>
<body>
<?
$aaa=fopen("plik.txt", "w");
$dane = fread($aaa, 999);
fclose($aaa);
echo ("$dane");
?>
</body>
</html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-2" />
</head>
<body>
<?
$aaa=fopen("plik.txt", "w");
$dane = fread($aaa, 999);
fclose($aaa);
echo ("$dane");
?>
</body>
</html>