View Single Post
  #6 (permalink)  
Old 02-04-07, 07:27 AM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,074
Thanks: 11
Thanked 88 Times in 83 Posts
Half. Use mysql_real_escape_string() on all user defined variables you're going to insert.

And you can do it directly like this.
PHP Code:

$free_text mysql_real_escape_string($_POST['free_text']);

$awards_text mysql_real_escape_string($_POST['awards_text']); 
And if $id2 is supposed to be a numeric value, I'd use intval() on it.

PHP Code:

$id2 intval($_POST['id2']); 

www.php.net/intval
Reply With Quote