No. of Recommendations: 4
BTW, I should point out that depending on where your variables are coming from, your code could be vulnerable to a SQL injection attack.

Be sure to make sure any data that comes from user input (e.g. anything from a querystring or form post) is checked to ensure that it is safe to use in your SQL statements.

Two good resources that explain SQL injections and how to avoid them in PHP:

http://www.php.net/manual/en/security.database.sql-injection.php

http://en.wikibooks.org/wiki/Programming:PHP:SQL_Injection

HTH!

TMFConch
Print the post  

Announcements

When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.
Advertisement