03-09-2018, 12:41 PM
Hi Brandin, Thanks for your reply. I've extracted the relevant lines of code from my script:-
$sqlu = "INSERT INTO(, , , , , , , , ) VALUES ( ? )";
$insert_memdat = array($paramsu['email'], $paramsu['username'], $paramsu['password'], $paramsu['fname'], $paramsu['lname'], $paramsu['permissions'], $paramsu['syear'], $paramsu['created'], $paramsu['aifhs_id']);
if (!$db->query($sqlu,$insert_memdat));
{
die('Error adding user: '.__LINE__);
}
Between the first & second line of code there is a chunk of code that populates the array $paramsu with the data from my "members" table and generates the password using the UserSpice code plus additional elements that I require elsewhere in the code. I did initially have the required elements listed in the db->query call but changed it to the above where I assign them to the array $insert_memdat. I get the same error whichever I adopt.
May I ask another newbie question please? Is there an explanation of the fields in the "users" table available anywhere so that I can understand what each is used for? For example I want to allow the member to be able to change the "username" from the one that is automatically generated by my "enrolment" script following their payment via PayPal. Is there some "users" setting I need to change?
Regards
Nello
$sqlu = "INSERT INTO
Code:
users
Code:
email
Code:
username
Code:
password
Code:
fname
Code:
lname
Code:
permissions
Code:
join_date
Code:
created
Code:
aifhs_id
$insert_memdat = array($paramsu['email'], $paramsu['username'], $paramsu['password'], $paramsu['fname'], $paramsu['lname'], $paramsu['permissions'], $paramsu['syear'], $paramsu['created'], $paramsu['aifhs_id']);
if (!$db->query($sqlu,$insert_memdat));
{
die('Error adding user: '.__LINE__);
}
Between the first & second line of code there is a chunk of code that populates the array $paramsu with the data from my "members" table and generates the password using the UserSpice code plus additional elements that I require elsewhere in the code. I did initially have the required elements listed in the db->query call but changed it to the above where I assign them to the array $insert_memdat. I get the same error whichever I adopt.
May I ask another newbie question please? Is there an explanation of the fields in the "users" table available anywhere so that I can understand what each is used for? For example I want to allow the member to be able to change the "username" from the one that is automatically generated by my "enrolment" script following their payment via PayPal. Is there some "users" setting I need to change?
Regards
Nello