I am trying to load a flat file to a webpage using the following code:
$BlockedFile = fopen($BlockedFileName,"r"
;
a null $BlockedFile is an error
if (feof($BlockedFile)) {}
$DBLink = mysql_connect('localhost',$SVSiteDatabase,$SVDatabaseUser,$SVDatabasePasswd);
$SiteDB = mysql_select_db($SVSiteDatabase);
while (!feof($BlockedFile) {}
$RecordIn = fgets($BlockedFile);
$FirstName = addslashes(trim(substr($RecordIn,0,20)))
$SQLStmt = "select Id from Users where LastName='$LastName' and FirstName='$FirstName' and StreetAddress='$StreetAddress';
$UserResult = mysql_query($SQLStmt) or die("Unable to get User Result using '$SQLQuery'..."
;
$TimeStamp = date("YmsHis"
;
$SQLStmt = "insert into Users set LastName='$LastName', ...";
The flat file is in the form of a web page with a url of
My question is will I need to save this file in my home directory and save as a.tab file or should the script be able to pull the data directly from the url. When I attempt to use the code in a blank html page with embedded ?>php I do not get any errors when I load the page, however I get no data either. Any suggestions? Also will I need to pull the flat file into mysql?
$BlockedFile = fopen($BlockedFileName,"r"

a null $BlockedFile is an error
if (feof($BlockedFile)) {}
$DBLink = mysql_connect('localhost',$SVSiteDatabase,$SVDatabaseUser,$SVDatabasePasswd);
$SiteDB = mysql_select_db($SVSiteDatabase);
while (!feof($BlockedFile) {}
$RecordIn = fgets($BlockedFile);
$FirstName = addslashes(trim(substr($RecordIn,0,20)))
$SQLStmt = "select Id from Users where LastName='$LastName' and FirstName='$FirstName' and StreetAddress='$StreetAddress';
$UserResult = mysql_query($SQLStmt) or die("Unable to get User Result using '$SQLQuery'..."

$TimeStamp = date("YmsHis"

$SQLStmt = "insert into Users set LastName='$LastName', ...";
The flat file is in the form of a web page with a url of
My question is will I need to save this file in my home directory and save as a.tab file or should the script be able to pull the data directly from the url. When I attempt to use the code in a blank html page with embedded ?>php I do not get any errors when I load the page, however I get no data either. Any suggestions? Also will I need to pull the flat file into mysql?