03-05-2018, 04:51 PM
May be a "newbie" being stupid but need help. I maintain the website for the "Anglo-Italian Family History Society" and am looking to change the access to the various pages to improve security. At the moment the site access is split between "open", "members only" & "committee only" and is controlled by the host on a protected directory basis with a single userid/password for all members and a different on for the committee. I have been asked to provide individual logins for each person etc and Userspice seems to be the solution. I am currently "playing" with it on my development system keeping the sites "page look & feel". The first thing I'm tackling is to link the Userspice "users" table with our "members" table which needs a mutual link "aifhs_id" in both tables. I have produced php code based on the Userspice code that is supposed to transfer the members details to the user table and add a default password. Hoewver I get the following error:-
Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in C:\AIFHS\Klamath\users\classes\DB.php on line 62.
I have enable DEBUG in the query function in DB.php and get the following display:-
DEBUG: query(sql=INSERT INTO(, , , , , , , , ) VALUES ( ? ), params=Array ( [0] => juliegoucher@gmail.com [1] => Member_0001 [2] => $2y$12$J6vHdar6qqDCyBaVIg58i.GaDMXgplQuk2UtCCm3/hutwkLTRvhkq [3] => Julie D [4] => Goucher [5] => 1 [6] => 2002-04-01 [7] => 2018-03-05 [8] => 1 ) )
As far as I can see there are 9 table entries and 9 data items so don't understand the error. Can you more experienced people point me in the right direction?
Nello Ostacchini
Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in C:\AIFHS\Klamath\users\classes\DB.php on line 62.
I have enable DEBUG in the query function in DB.php and get the following display:-
DEBUG: query(sql=INSERT INTO
Code:
users
Code:
email
Code:
username
Code:
password
Code:
fname
Code:
lname
Code:
permissions
Code:
join_date
Code:
created
Code:
aifhs_id
As far as I can see there are 9 table entries and 9 data items so don't understand the error. Can you more experienced people point me in the right direction?
Nello Ostacchini