I\'m trying to insert data into a database that I have on my server.
To connect to my database I have the following code:
Why are you back-ticking the values? Try just single quotes:
$sql = "INSERT INTO USERS (userName, password) VALUES ('test', 'testy')";
Also, check your PHP error log, it may give you some insight.
And according to the docs, I believe you have to use exec() vs query(), for doing non-select queries such as inserting, updating, and deleting. If you plan on passing in variables to the $sql variable, you should also read up on prepare.