Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,165,734 members, 7,862,397 topics. Date: Sunday, 16 June 2024 at 03:33 PM |
Nairaland Forum / Science/Technology / Programming / PHP Functions To Clean Database Inputs (1290 Views)
We Develop Website And Apps + Full Functions: Check In / Laravel And Phalcon Which Is Better? Need Inputs / Most Used Mysql Database Functions (2) (3) (4)
PHP Functions To Clean Database Inputs by D34lw4p(m): 7:42am On Jan 26, 2016 |
1) Function for stripping out malicious bits
2) Sanitization function Uses the function above, as well as adds slashes as to not screw up database functions.
Usage
Join The Coders Forum www.nct.com.ng |
Re: PHP Functions To Clean Database Inputs by DonSegmond(m): 3:25pm On Jan 26, 2016 |
This is terrible advice. Never do this. Sanitizing your own input will get you in trouble in some many ways. There are so many creative ways to inject malformed and evil input into a database for SQL injection. The best way to handle untrusted inputs is to delegate to the Database driver. Use prepared statements, with parameters With PHP, you can get the benefit of that using PDO. 2 Likes |
Re: PHP Functions To Clean Database Inputs by D34lw4p(m): 5:27pm On Jan 26, 2016 |
DonSegmond: lolzz you are saying rubbish man! total junk!!! |
Re: PHP Functions To Clean Database Inputs by Kidstell: 2:54pm On Jan 28, 2016 |
D34lw4p: do you mean PDO is rubbish or you meant to say that using your own string as a test argument for your functions is best. please shed more light. secondly did you create the functions yourself 1 Like |
Re: PHP Functions To Clean Database Inputs by Nobody: 3:39pm On Jan 28, 2016 |
Not advisable at all. |
(1) (Reply)
Conflict Between Apache24 And Simple Server On My System. PLS HELP!!!!!!!!!!!!!! / Steps To Sign In Facebook Account, Facebook Sign In, Facebook Sign Up / Javascript Developers
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11 |