Basically i have the search script working well, but i need to replace the $input with $inputused if word is found.
I have tried str_replace() with no luck any ideas?
Thank you
<html>
<body>
<form name="form" method="post">
<br><input type="text" id="search" name="search_box" style="background:#000006; color: #FF0000" />
<br><input type="submit" name="submit" value="Search for Key" />
</form>
</body>
</html>
<?php
$myurl = "./testFile.txt";
$input = $_POST['search_box'];
$inputused = $input . "-" . "USED";
if(isset($_POST['submit'])){
if (!strlen(trim($_POST['search_box']))){
echo "You must enter a key.";
} else {
if(isset($_POST['submit'])){
$file = file_get_contents($myurl);
$split = explode("\n", $file);
if(in_array($input, $split))
{
echo "It's here!";
} else
{
echo "NOT FOUND";
}
}
}
}
?>