Błędy podkreślone
źle wklejone zapytanie do mysql w takesignup.php
jest zapewne tak wklejone
$ret = mysql_query("INSERT INTO users (username, passhash, secret, editsecret, polecajacy, email, status, ". (!$arr[0]?"class, ":"") ."added) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpasshash, $secret, $polecajacy, $editsecret, $email, (!$arr[0]?'confirmed':'pending')))).
a powinno być
$ret = mysql_query("INSERT INTO users (username, passhash, secret, editsecret, polecajacy, email, status, ". (!$arr[0]?"class, ":"") ."added) VALUES (" .
implode(",", array_map("sqlesc", array($wantusername, $wantpasshash, $secret, $editsecret, $polecajacy, $email, (!$arr[0]?'confirmed':'pending')))).
a te zapytanie ze zmienną
też zapewne jest źle wkejone
$polecajacy = $_POST["polecajacy"];
powinno być pod
$editsecret = (!$arr[0]?"":mksecret());