Kod · PHP
<!DOCTYPE html>
<html>
<head>
<title>sonni aniqlab yozmasini topish</title>
</head>
<body>
<form>
<input type="text" name="soz">
<input type="submit" name="ok">
</form>
</body>
</html>
<?php
if(isset($_GET['ok'])){
$file = fopen('config.txt', 'r');
$handle = fread($file, filesize('config.txt'));
//print_r($handle);
$r = explode(" ", $handle);
if ($_GET['soz'] == $r['1']) {
echo "Dastur aktivlandi!";
}
else{
echo "Kalit xato!";
}
fclose($file);
}
?>