<?php
$file = fopen("a.txt","r")or die("File does not exist in the current folder.");
$s = $_POST["lname"];
$x = file_get_contents("a.txt");
$a = trim($x);
if (strpos($a, $s) !== false) {
print%
<?php
$file = fopen("a.txt","r")or die("File does not exist in the current folder.");
$s = $_POST["lname"];
$x = file_get_contents("a.txt");
$a = trim($x);
if (strpos($a, $s) !== false) {
print("___ is on the list");
}
else {
print("___ is not on the list");
}
?>
php is suppose to tell you if a word is on a.text file. the text file has 50 words in it . i did the JavaScript for it but im having trouble with the PHP. the file is just opening and not reading
<?php
$file = fopen("a.txt","r")or die("File does not exist in the current folder.");
$s = $_POST["lname"];
$x = file_get_contents("a.txt");
$a = trim($x);
if (strpos($a, $s) !== false) {
print("___ is on the list");
}
else {
print("___ is not on the list");
}
?>
php is suppose to tell you if a word is on a.text file. the text file has 50 words in it . i did the JavaScript for it but im having trouble with the PHP. the file is just opening and not reading
$file = fopen("a.txt","r")or die("File does not exist in the current folder.");
$s = $_POST["lname"];
$x = file_get_contents("a.txt");
$a = trim($x);
if (strpos($a, $s) !== false) {
print%
<?php
$file = fopen("a.txt","r")or die("File does not exist in the current folder.");
$s = $_POST["lname"];
$x = file_get_contents("a.txt");
$a = trim($x);
if (strpos($a, $s) !== false) {
print("___ is on the list");
}
else {
print("___ is not on the list");
}
?>
php is suppose to tell you if a word is on a.text file. the text file has 50 words in it . i did the JavaScript for it but im having trouble with the PHP. the file is just opening and not reading
<?php
$file = fopen("a.txt","r")or die("File does not exist in the current folder.");
$s = $_POST["lname"];
$x = file_get_contents("a.txt");
$a = trim($x);
if (strpos($a, $s) !== false) {
print("___ is on the list");
}
else {
print("___ is not on the list");
}
?>
php is suppose to tell you if a word is on a.text file. the text file has 50 words in it . i did the JavaScript for it but im having trouble with the PHP. the file is just opening and not reading