Solved

Bad Form Data

Posted on 2004-04-17
2
156 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

734 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