Ho provato con tanti metodi
Codice HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="AlterVista - Editor HTML"/>
<title></title>
</head>
<body>
<form action="risultati.php" method="post">
<input type="text" name="cerca">
<input type="submit" name="altezza" value="Search">
</form>
</body>
</html>
l'html è giusto.
Codice PHP:
<?php
$_POST['cerca'] = 'foo';
$lines = file('/file.txt');
// Store true when the text is found
$found = false;
foreach($lines as $line)
{
if(strpos($line, $search) !== false)
{
$found = true;
echo $line;
}
}
// If the text was not found, show a message
if(!$found)
{
echo 'No match found';
}
Però non riesco a "decifrare" quersto PHP.
Lo trovo confuso.
Help me plz