Re: database injection
- From: Peter van Schie <vanschie.peter@xxxxxxxxx>
- Date: Fri, 14 Jul 2006 21:27:55 +0200
Mike schreef:
I have read through lots of messages about database injection but I'm
still a bit confused.
I have a website where users input data either for searching or storing
on a database such as logging in or storing personal data in the
database.
I'm confused what commands to use to make sure commands such as DROP
etc are not entered.
I've seen stripslashes(), addslashes(), striptags() etc. What should
be used?
Take a look at mysql_real_escape_string. It's also a good idea to setup a mysql useraccount for all queries from the users. Simply don't allow that account to execute DROP queries and only allow it to execute queries you really need.
HTH.
Peter.
--
http://www.phpforums.nl
.
- Follow-Ups:
- Re: database injection
- From: Cujo
- Re: database injection
- References:
- database injection
- From: Mike
- database injection
- Prev by Date: database injection
- Next by Date: Re: "call to undefined function" mysql_error when adding new rows to table
- Previous by thread: database injection
- Next by thread: Re: database injection
- Index(es):
Relevant Pages
|