Skip to content
Advertisement

PHP PDO Error in Select Statement

I am having some issues with PDO. First issue is that in my connection string, I cannot use variables defined in another file (tried include & require). It gives me an error and shows the connectionstring having the variable name instead of the value (yes, single and double quotes were tried).

Second issue and more pressing is that I am getting an error when trying to validate a login. I had it working with the old mysqli, so I know that the html is valid, just not the new logic. Attached is the function I am using:

JavaScript

the exact error i get is:

JavaScript



Thanks in advance!!

Advertisement

Answer

Here is my final code to make this part of the PDO statement work:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement