Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Best way to sanitize / filter user input?
#2
http://php.net/manual/en/function.mysql-...string.php
http://php.net/manual/en/function.addslashes.php

You could also create an array with unwanted queries, and, if the input contains anything in the array, echo "invalid input";

Those are the first two ideas, but, if you have an imagination, you can come up with different, and fun, ways of protecting input.
Reply


Messages In This Thread
RE: Best way to sanitize / filter user input? - by Buffy - 06-01-2010, 04:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP email input form - having trouble getting the form to work... abayindi 4 2,734 03-19-2012, 10:02 AM
Last Post: RainbowDashFTW
  PHP Form to Email (And the form input as VCF Attachment)? VypeR 1 3,871 10-27-2010, 06:01 AM
Last Post: VypeR
  User Management Script - User Cake Support 9 5,623 05-13-2010, 03:21 PM
Last Post: Julie

Forum Jump:


Users browsing this thread: 1 Guest(s)