Page 1 of 1

Using PDO & SQL Server 2008

Posted: Sun Jan 19, 2014 3:06 pm
by J39L4753
Hi, this is my first post here...

I've started to use PDO in my latest project, it's different coding from what I've done previously.

I have a registration form which the user inputs relevant details to register on the site. This seems to connect to the SQL Server database, run through all the code, tell the user the details have been added. When I check the database there are no records input. Why would this be, I have checked the generated SQL string manually and it will insert the record. I have also done a simple connection and select * from table to check what records are in the table, that works ok and returns all records.

I just can't see why it doesnt insert.

Attached is a copy of the site to make it eaiser for people to see what I have

Re: Using PDO & SQL Server 2008

Posted: Mon Jan 20, 2014 5:07 am
by J39L4753
In SQL Server using hash & salt what field type in the table should the salt be, varchar, char or binary?

Re: Using PDO & SQL Server 2008

Posted: Mon Jan 20, 2014 12:44 pm
by requinix
Assuming your salt is not binary then probably char (salts tend to be the same length) or varchar (if they're not). If it is binary then, well, [var]binary.

I take it you've narrowed down the problem to be something relating to the field type for the salt?

Re: Using PDO & SQL Server 2008

Posted: Wed Jan 22, 2014 11:49 am
by J39L4753
requinix wrote:Assuming your salt is not binary then probably char (salts tend to be the same length) or varchar (if they're not). If it is binary then, well, [var]binary.

I take it you've narrowed down the problem to be something relating to the field type for the salt?
Thanks I'll try that...

I haven't 100% narrowed it down to the problem of field type within the database, I'm trying to think of everything and cross it off the list. At the moment apart from this I'm not sure what else it could be. This is why I attached a copy of the site to see if anyone looking at the code can spot the issue