Archive for the ‘PHP’ Category

Some MySQL For The Brain

Tuesday, March 4th, 2008

Looking for a few, quick PHP+MySQL tips? You found some.
List all tables in the pre-set database:
SHOW TABLES;
Always, always, always use an auto-incrementing unique ID:
CREATE TABLE table_name (
id INT NOT NULL AUTO_INCREMENT,
table_field1 varchar(250) NOT NULL default ”,
PRIMARY KEY (id)
);
Adding to an auto-incrementing table:
@mysql_query(”insert into table_name values(NULL,’My Field’)”);
There’s actually three different PHP API’s which you can use:

The [...]

The “Almost” Perfect Smarty Setup

Monday, November 19th, 2007

So, you’re looking for the “almost” perfect startup tutorial for the uber-famous Smarty template engine written with PHP? Or, are you just looking for a good straight-up to the point tutorial on using Smarty? Well, either way HERE IT IS!!
For the basic setup check out this tutorial here. Once you have Smarty running on your [...]

Kiler A-TGP/CMS Breaking News

Tuesday, November 6th, 2007

I have some news about our upcoming TGP/CMS system titled Kiler A-TGP/CMS. We have been looking into using template engines with the system for quite some time now and have finally decided on which to use. At first, we wanted to use our own template system but then have decided otherwise. We have finalized on [...]

Why Cookies Are Better Than Sessions

Thursday, November 1st, 2007

In the past I’ve gotten quite a bit of heat from my colleagues for utilizing cookies over sessions with PHP, and I’ve finally had enough! I will now go ahead and explain the reasons why I use cookies over sessions for everything.
Cookies have been around since day one with dynamic scripting languages. They were the [...]

Introduction To PHP: Part #1: What Is PHP?

Monday, October 29th, 2007

In what will be a new tutorial series here at KilerMedia.com, we are going to teach you PHP!
In this first tutorial we ask the question, “What Is PHP?”
PHP is a reflective programming language originally designed for producing dynamic web pages. PHP is used mainly in server-side scripting, but can be used from a command line [...]

Hello PHP Version 6!

Sunday, August 12th, 2007

So it finally came to my attention that the “hackers” over at The PHP Group are back at it again. PHP version 6 is in full production swing and looks as though to be heading down the path of least resistance when it comes to when it will be ready to use professionally. Now, if [...]

PHP Tip: Using the Ternary Operator

Sunday, August 12th, 2007

A ternary operator is an operator that takes three arguments in total. Two actual arguments and one result. The arguments and result can be of different types.
Many programming languages that use C-like syntax feature a ternary operator, (?:); unqualified, “ternary operator” usually refers to this. The (?:) operator is used as a shorthand replacement for [...]