Solved

Bad Form Data

Posted on 2004-04-17
2
150 Views
Last Modified: 2006-11-17
Hello,

What are the functions and what can I do to make sure the data that I get from a form is not gonna do bad things to the database or gonna cause my scripts to act screwy....

I used to have them all saved but I lost them

htmlentities is one of them I know but I thought there was more!


Thanks,

Randy
0
Comment
Question by:rjohnsonjr
2 Comments
 
LVL 14

Accepted Solution

by:
ThG earned 250 total points
ID: 10851510
look them up on the manual, they are needed for doing different things:
mysql_escape_string(), is_numeric(), isset(), stripslashes(), htmlentities(), urlencode()

i can't think of anything else right now..anyway note that on a default PHP installation, you can fetch strings already db-safe (in fact it adds \ before some special chars.
0
 
LVL 10

Expert Comment

by:eeBlueShadow
ID: 10869366
The PHP options ThG is referring to are the magic_quote options:

magic_quotes_gpc
magic_quotes_runtime and
magic_quotes_sybase
0

Featured Post

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now