- Joined
- Jul 1, 2005
- Messages
- 77
- Reaction score
- 0
I am using PHP (running latest xampp) & MSSQL 2000. This is for an MU Online website. I just started learning SQL & PHP yesterday lol.
I understand how SQL injection works & what it does. The Problem: I am going to use a function to clean form input during account registration & account login to stop injection. I understand for MySQL there is mysql_real_escape_string(), but no equivalent for MSSQL.
So a few questions:
1) What can I use to protect my form inputs instead of mysql_escape_string(). How can I use it?
2) What can I do to make sure only A-Z, a-z, 0-9 characters are being used in my fields. I want anything else to fail before any query is even run.
3) I've read online that stored procedures can be used in MSSQL to prevent SQL injection. Can someone please explain how to protect this way as well?
Thanks in advance for help!
I understand how SQL injection works & what it does. The Problem: I am going to use a function to clean form input during account registration & account login to stop injection. I understand for MySQL there is mysql_real_escape_string(), but no equivalent for MSSQL.
So a few questions:
1) What can I use to protect my form inputs instead of mysql_escape_string(). How can I use it?
2) What can I do to make sure only A-Z, a-z, 0-9 characters are being used in my fields. I want anything else to fail before any query is even run.
3) I've read online that stored procedures can be used in MSSQL to prevent SQL injection. Can someone please explain how to protect this way as well?
Thanks in advance for help!

