Parašė ArturasS· 2009 Lap. 24 00:11:34
#18
<html>
<head>
<title>FORMA</title>
</head>
<body>
<?php
$puslapis = $_GET['puslapis'];
if ($puslapis == ""){
<form method='post' action'?puslapis=2'>
<input name='vardas' maxlength='15'>
<input name='pavarde' maxlength='20'>
<input name='tel' maxlength='10'>
<input type='submit' value='SIUST'>
</form>
}
if ($puslapis == "2"){
$vardas = $_POST['vardas'];
$pavarde = $_POST['pavarde'];
$tel = $_POST['tel'];
if ($vardas == "" || $pavarde == "" || $tel == ""){
echo "Ivesk ta, ta arba ta";
} else {
echo "Isiusta sekmingai";
$jopapa = fopen("info.txt", "w+");
fwrite($jopapa, "$vardas|$pavarde|$tel");
fclose($jopapa);
chmod("info.txt", 0777);
}
}
?>
</body>
</html>
Special for u ;)
Redagavo ArturasS· 2009 Lap. 24 00:11:36