function userRegister($username, $password){ $username = mysql_real_escape_string(htmlentities($username)); $password = sha1($password); mysql_query("INSERT INTO users (username, password) VALUES ($username, $password)"); }
Search found 5 matches
- Wed Mar 14, 2012 4:23 pm
- Forum: Tutorials
- Topic: Register and Login [Part 02]
- Replies: 9
- Views: 1512
Re: Register and Login [Part 02]
- Sun Mar 11, 2012 7:04 pm
- Forum: Tutorials
- Topic: Register and Login [Part 02]
- Replies: 9
- Views: 1512
Re: Register and Login [Part 02]
Now it won't send to the database.
- Wed Mar 07, 2012 5:22 pm
- Forum: Tutorials
- Topic: Register and Login [Part 02]
- Replies: 9
- Views: 1512
Re: Register and Login [Part 02]
I don't see why I do? I have used a variable in MYSQL without quotes and it has worked fine. But I will try anyway.
- Sun Mar 04, 2012 8:45 pm
- Forum: Tutorials
- Topic: Register and Login [Part 02]
- Replies: 9
- Views: 1512
Re: Register and Login [Part 02]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1I changed it to backticks.
- Sun Mar 04, 2012 7:10 pm
- Forum: Tutorials
- Topic: Register and Login [Part 02]
- Replies: 9
- Views: 1512
Register and Login [Part 02]
Well so I am getting this error upon submitting my form: Warning: mysql_result() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\devshare\core\func\user.func.php on line 35 And this is the code it isn't liking: function userExists($username) { $username = mysql_real_escape_strin...