Solved

Bad Form Data

Posted on 2004-04-17
2
154 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

749 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