PHP Code:
$sql = "";
$profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield");
while ($profilefield=$DB_site->fetch_array($profilefields)) {
$varname="field$profilefield[profilefieldid]";
$sql.=",'".addslashes($$varname)."'";
}
$DB_site->query("INSERT INTO userfield VALUES ($userid$sql)");
$action="modify";
echo "<p>Record added</p>";
}
replace it with:
$sql = "";
$userfieldsnames="(userid";
$profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield");
while ($profilefield=$DB_site->fetch_array($profilefields)) {
$userfieldsnames.=",field$profilefield[profilefieldid]";
$varname="field$profilefield[profilefieldid]";
$sql.=",'".addslashes($$varname)."'";
}
$userfieldsnames.=')';
$DB_site->query("INSERT INTO userfield $userfieldsnames VALUES ($userid$sql)");
$action="modify";
echo "<p>Record added</p>";
}
i cann't find this in user.php it cann't work on 2.20~~
or someone know how to fix it??