lintz
Oct 20th, 2004, 09:52 PM
I'm using the code below to read a txt file from my site then looping through it 1 line at a time and updating user details. The problem is if the txt file has more than 1 line the database is not updated. Can anyone help me out?
include("db_connect.php");
$array_tmp = file('osprey.txt');
foreach($array_tmp as $v) {
$Update_Details = mysql_query("UPDATE tblUsers SET OSPREY = 'YES' WHERE username = '$v'");
}
echo "All Complete"
include("db_connect.php");
$array_tmp = file('osprey.txt');
foreach($array_tmp as $v) {
$Update_Details = mysql_query("UPDATE tblUsers SET OSPREY = 'YES' WHERE username = '$v'");
}
echo "All Complete"