Solved

Bad Form Data

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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 …

737 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