Solved

Bad Form Data

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Wordpress Pagination Function Not working ? 7 39
What do the parameters in the PDO function debugDumpParams mean? 1 34
Wordpress Security 29 48
Row insertion failed. Array 5 46
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

856 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