| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Jun 2004 Location: Iowa City
Posts: 703
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | a little rusty on protecting input I've got some PHP code inserting things into a database.... I'm a little rusty on how to protect the data to prevent XSS and SQL injections, looking for some tips. PHP Code: Would is_numeric() be efficient for userid/strangerid? and Is clean() good enough?
__________________ formally ninedogger ------ Want to talk to a stranger? -->| Click Here | TalkToAStranger.com | <-- Meet New Friends |
| | |
| | #2 (permalink) |
| NamePros Regular Join Date: Apr 2006
Posts: 360
![]() ![]() ![]() ![]() | is_numeric just tells you if it is a number it doesn't actually sanitize the data held by that variable. To ensure that the variable is a integer do the following: PHP Code: ????: NamePros.com http://www.namepros.com/showthread.php?t=695926 Cheers, Jay
__________________ Canadian Domain Registrar Ready.ca |
| | |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Jun 2004 Location: Iowa City
Posts: 703
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Thank You baxter i'll give that a go
__________________ formally ninedogger ------ Want to talk to a stranger? -->| Click Here | TalkToAStranger.com | <-- Meet New Friends |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I Need Your Input | DebacleX | Programming | 6 | 12-09-2008 07:39 PM |
| Database Question | Zona | Website Development | 2 | 10-08-2008 07:48 PM |
| How to prevent form input from another website sending vars to mine? | thenext88 | Programming | 9 | 08-23-2008 01:27 PM |
| Thanks for any input on the following Domains. | nhay | Domain Appraisals | 0 | 01-19-2007 12:33 PM |
| Do you guys think that to input NNN is much faster than input generic words or LLL? | owntype | "Short" Domain Discussion | 2 | 10-13-2006 10:01 AM |