i need helping making a php which tells 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
<?php
<?
$file = fopen("a.txt","r")or die("File does not exist in the current folder.");
$s = $_POST["lname"];
$x = " ";
$a = trim($x);
if(strcmp($s, $a) == 0)
print(" _____ is on the list");
else
print("____ is not on the list");
?>
<?php
<?
$file = fopen("a.txt","r")or die("File does not exist in the current folder.");
$s = $_POST["lname"];
$x = " ";
$a = trim($x);
if(strcmp($s, $a) == 0)
print(" _____ is on the list");
else
print("____ is not on the list");
?>