Nov 22 07

Excellent PHP resources for beginners

by Dave

http://devzone.zend.com/node/view/id/627

http://www.tizag.com

? http://www.w3schools.com

Nov 18 07

Best Beginners Guide to mod_rewrite I’ve Found

by Dave

http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html

Enjoy!

Nov 16 07

Fantastic Real-time Validation Javascript

by Dave

In compressed form has a very light footprint of only 10kb.? ? The validation isn’t laggy at all. Excellent tool.

http://www.livevalidation.com/

Nov 15 07

The greatest site I’ve found for Web 2.0 PSD files and designs

by Dave

http://www.dezinerfolio.com

Nov 15 07

A Great Analysis of the Top Web 2.0 Sites

by Dave

Click to view article

Nov 15 07

Style your site right – with StyleIgnite.com

by Dave

http://www.styleignite.com/

Nov 14 07

A Fantastic PHP Database Class

by Dave

http://slaout.linux62.org/php/index.html

Well documented, easy to use, and has an impressive debug feature!

Nov 13 07

How to write a Database Class in PHP5

by Dave

http://stephensaine.com/?p=6

Nov 13 07

Building a user authentication system in PHP

by Dave

Article linked here

Nov 2 07

Preventing SQL Injection Attacks

by Dave

<?php

if (isset($_POST['product_name']) && isset($_POST['product_description']) && isset($_POST['user_id'])) {
// Connect

$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password');

if(!is_resource($link)) {

echo "Failed to connect to the server\n";
// ... log the error properly

} else {

// Reverse magic_quotes_gpc/magic_quotes_sybase effects on those vars if ON.

if(get_magic_quotes_gpc()) {
$product_name? ? ? ? = stripslashes($_POST['product_name']);
$product_description = stripslashes($_POST['product_description']);
} else {
$product_name? ? ? ? = $_POST['product_name'];
$product_description = $_POST['product_description'];
}

// Make a safe query
$query = sprintf("INSERT INTO products (`name`, `description`, `user_id`) VALUES ('%s', '%s', %d)",
mysql_real_escape_string($product_name, $link),
mysql_real_escape_string($product_description, $link),
$_POST['user_id']);

mysql_query($query, $link);

if (mysql_affected_rows($link) > 0) {
echo
"Product inserted\n";
}
}
} else {
echo
"Fill the form properly\n";
}
?>