473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to sanitize php variable efficiently

4
I need to find the best way to efficiently sanitize $_POST, $_GET variables by type of variable (if $_POST['email'] then verify if it is really an email, if $_POST['zip']; verify if it's a 5 digits number, etc...)

Any functions to recommend?

Thank you in advance.
Aug 2 '09 #1
1 4425
Dormilich
8,658 Expert Mod 8TB
see PHP Filter functions and PHP Filter @ w3schools
Aug 3 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: LRW | last post by:
What I need to do is a comparison to see if a variable equals none of the 48 contiguous United States, but as efficiently as possible. The best way I can come up with the the textbook method of :...
2
by: littlefitzer | last post by:
Hi, Say for example I want to use the following line in my XSL: <xsl:call-template name="buildText"/> I know I have to have a template defined named buildText. My question is: Is there a way...
7
by: bartek | last post by:
Hello, I've been pondering with this for quite some time now, and finally decided to ask here for suggestions. I'm kind of confused, actually... Maybe I'm thinking too much... Brain dump...
1
by: Regnab | last post by:
I've got a value in an access table which I would like to use in my vba code. I figure the best way to work with it is to assign its value to a variable in my code. I imagine this would be done...
14
by: Luiz Antonio Gomes Pican?o | last post by:
How i can store a variable length data in file ? I want to do it using pure C, without existing databases. I'm thinking to use pages to store data. Anyone has idea for the file format ? I...
0
by: Phil Barnes | last post by:
Hello - crossing over from the Dark Side (ASP/Windows) to PHP/NIX. I have found the PHP Sanitize functions provided by OWASP to be a useful resource. First Question: If I use...
8
by: nephish | last post by:
hey there, is this ok? class MyClass { var $start; var $finish; function MyClass($start, $finish) { $this->start = $start; $this->finish=$finish,
31
by: krypto.wizard | last post by:
How to divide a number by 7 efficiently without using - or / operator. We can use the bit operators. I was thinking about bit shift operator but I don't know the correct answer.
5
pradeepjain
by: pradeepjain | last post by:
This is the function that i use to remove all quotes and things.But this time its giving error y i dont know. function sanitize($input){ if(is_array($input)){ foreach($input as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.