HELLO
I AM
JOHN

I've been breaking making websites for over 15 years.

Mimic AJAX Form Posts with PHP, Javascript, and Cookies

I was recently reading various articles on how to load external pages using javascript and loading the results into a container div, mimicing that aspect of AJAX requests. But the main complaint I read was that you couldn’t POST. I thought it would be neat to figure out a way to do this, so after toying around with a few ideas, I came up with this dirty little method of posting form fields through javascript, passing the fields and values to php script through cookies, placing them into the $_POST array, and proceeding with business as usual.

Note that this method requires that the user has Javascript and cookies enabled. Also note that there is absolutely NO USE of the XmlHttpRequest object.
Read more

Share

Preventing SQL Injection with PHP

sql injectionSQL Injection. We’ve all heard the term. But what exactly is it? Sounds dirty and vile… or maybe something you get at the doctor’s office. A new type of plastic surgery maybe? Well, let’s find out, shall we?

From Wikiedpia.com:

SQL injection is a technique that exploits a security vulnerability occurring in the database layer of an application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed. It is in fact an instance of a more general class of vulnerabilities that can occur whenever one programming or scripting language is embedded inside another.

Read more

Share

Imagining the Tenth Dimension

I dont know how many of you have seen this video, but I thought it worthwhile to share, just in case you hadn’t.

Based on the book “Imagining the tenth dimension”, by Rob Bryanton, you are taken through the first chapter of the book where the concepts of the 10 dimensions are explained in a fairly easy to follow and entertaining fashion.

Amazing. The things some people have the time and mental capacity to think about – Nevermind the mathematical ingenuity! Awesome video, just watch it! You’ll feel way smarter (or way dumber) once you’re done.
Read more

Share

PHP/AJAX – Instant DB Query and Results

This tutorial will teach you how to use PHP and the XMLHttpRequest object [AJAX] to query a database for a value and display a result on the screen without having to refresh the page.

In this particular example, we’re doing a simple query in the style of Google(tm) – Checking for the availability of a username during account registration.
Read more

Share

Simple Link Tracking with PHP – Part I

This little tutorial will teach you how to create a simple out-going link tracker in PHP.

One of our clients had a rotating-advertisement script we had set him up with, and they decided they wanted to count the number of times each ad was clicked. Easy enough to do, but why just count clicks? There’s so much more information that would be beneficial to capture. Where was the user when the clicked on the ad? When? What browser were they using? In response to their request, I whipped up this little script. This script can be inserted just about anywhere you need to track out-going links.
Read more

Share