05th Dec2011

jQuery Rating Script

by mglaman

For KenoBarNight I just added a simple rating system mocking that of YouTube and others; a simple “I Like It” or “I Don’t Like It”. Use whatever verbage you’d like, that is what this script does. The user clicks one of the buttons, and the script POSTs the data to a PHP script which saves a MySQL entry so we can do some math later and find a rating. Continue reading “jQuery Rating Script” »

26th Nov2011

Sanitize Text for SQL

by mglaman

Cross Site Scripting (XSS) and SQL Injections are some of the biggest security threats to a PHP application.  Every developer has different ways of preventing SQL Injections or malicious JavaScript from being inserted into the database. Here are some easy solutions to help safeguard your PHP applications. Continue reading “Sanitize Text for SQL” »

26th Nov2011

Setting Cookies with PHP

by mglaman

If you plan on building a PHP application, you’ll probably end up using cookies, especially if there are user accounts. Cookies will allow you to store specific data for a certain amount of time. Here are some tips and tricks to make sure you do not run into too many problems. Continue reading “Setting Cookies with PHP” »

24th Nov2011

PHP Server Variables

by mglaman

I know when I first started out learning PHP it was difficult finding good examples or live demos of simple PHP in use. Often I’d have a large number of files used to demonstrate built in PHP functions. So, to help any budding PHP developers out there I compiled a list of the PHP Server variables along with what data they provide.  Continue reading “PHP Server Variables” »