View RSS Feed

All Blog Entries

  1. Before You Start: the basics, for PHP in particular and for programming in general

    I wanted to take a few moments to talk about some of "the basics" that are all-to-often glossed over...

    A Matter of Style

    In general, I find that most PHP programmers fall into one of three main programming styles:
    • procedural: a simple ordered set of instructions, nested if's/ else's, etc.
    • functional: functions are little code containers that you can call on when needed. You [usually] give them arguments, they [usually] return values to you.
    • object-oriented:
    ...

    Updated 12-17-2012 at 03:49 AM by traq

    Tags: 1'", 1%2527%2522 Add / Edit Tags
    Categories
    PHP coding
  2. Taking Control

    Last week, I wrote about taking a "PHP-first" approach to programming - program first, output last. But what should go first in your program?

    M-V-C
    You may have heard about something called "MVC" (Model-View-Controller). If not, here's your crash course:

    Model

    Your Model is all of the information needed/used by your program. [Hopefully], the Model is well-organized. Think of it in terms of note-taking: notes are easier to ...
  3. Every PHP Tutorial Is Wrong

    Many PHP tutorials begin with an introduction to the "basics" of the language: the <?php ?> tags, and usually the echo construct. For example, something like this:

    PHP Code:
    <html>
    <head>
        <title>My First PHP Page</title>
    </head>
    <body>
        <?php
            
    echo "Hello World!";
        
    ?>
    </body>
    </html>
    Before I blast this, I want to ...

    Updated 11-03-2012 at 01:27 AM by traq

    Tags: 1'", 1%2527%2522 Add / Edit Tags
    Categories
    PHP coding , Web Design issues
  4. Scroll to Top Script

    Here's my alternative to the ddscript Jquery Scroll to Top Control V1.1

    scroll_to_top.js

    Code:
    $.fn.scroll_to_top = function(userOptions) {
    	var check_scroll = 0;
        var defaultOptions = {
    		image : 'jump_to_top.png',
    		image_height : '6%',
    		image_width : '3%',
    		scroll_distance : 200,
    		scroll_location : 0,
    		scroll_speed : 600,
    		button_animate_speed : 200,
    		button_animate_type : 'fade',
    ...
    Tags: 1'", 1%2527%2522 Add / Edit Tags
    Categories
    Uncategorized
  5. Order Form w/current options live total

    Okey doke,
    there haven't been any blogs in a while, so I thought I might have some. It's about a thread I was on (here) in which Williamsun wanted a form which autosummed a price. I ended up coming up with something along these lines.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type"
    ...
    Tags: 1'", 1%2527%2522 Add / Edit Tags
    Categories
    Uncategorized
Page 2 of 4 FirstFirst 1234 LastLast