Feed on
Posts
Comments

Archive for the 'Articles' Category

I’ve come up with a problem recently returning data via an XML feed using AJAX. In my case I was returning a list of images each having several links to perform various tasks (e.g. set as main image, add as thumbnail, add full image, etc).
The first load would go through fine and all images […]

Read Full Post »

A quick and easy way to protect yourself from mySQL injection attacks in PHP is to use…
$sql = “insert into table set “;
 foreach ($_POST as $key => $data)
 {
     $sql .= $key.” = ‘”.strip_tags(htmlentities(addslashes($data))).”‘,”;
 }
 $sql .= mysql_query(rtrim($sql,’,').”;”) or die(mysql_error());

What this script does is to take your $_POST data and remove anything malicious from it. Looping over […]

Read Full Post »

I’ve used my RSS feed generator on a few sites now, so I figure it’s about time I share. The final output validates and conforms to RSS2.0 standards so it will import into most things. I’ve even got mine linked to my facebook profile. The full code is at the bottom of the page.
Basically […]

Read Full Post »