Parašė ArturasS· 2009 Lap. 24 14:11:15
#22
<html>
<head>
<title>FORMA</title>
</head>
<body>
<?php
$puslapis = $_GET['puslapis'];
if ($puslapis == ""){
echo"
<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>
Sorry buvau pamiršęs echo sumest, imk :)
Redagavo ArturasS· 2009 Lap. 24 14:11:27