Menu

#1 uploading a list fails in 0.6.8

open
nobody
None
5
2002-06-01
2002-06-01
No

adding multiple addresses to the database by uploading
a text file fails.

The following code changes around line 199 in admin.php
seem to fix the problem

for($i=0;$i<sizeof($liste); $i++)
{
/* Ajouter un nouvel enregistrement dans
la table */
$hash = unique_id(); // added
by GR
$liste[$i]=trim($liste[$i]);
// modified by GR
//$query = "INSERT INTO
$news->tablenews VALUES('$liste[$i]'
)";
$query=" INSERT INTO
$news->tablenews (email,hash) VALUES ('
$liste[$i]','$hash')";
$result=
MYSQL_DB_QUERY($news->db,$query);
if(mysql_error()) print
$liste[$i]." : ".translate("Erreur")
." : ".mysql_error()."<br>";
else print $liste[$i]." : OK
;-)<BR>\n";
}

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.