ITC280 – versions and variables

I worked probably about 4 hours today on my pages.

I thought I would be getting into fancy queries, but I discovered that I hadn’t gotten all the pages to work together properly.

Public pages:

So far the two major public pages are just lists of includes. You have to get those right.

Private (php) includes:

The includes create links back and forth between the two public pages, so you have to make sure those links are set right. I set the link value in a variable.

Versions:

On top of that I have three versions of the site (soon to become two). If one version calls a page from another version, subsequent calls will fail.

My simplest version, using little-altered code from Bill, uses a different html style than my other ones (which use tables for some formatting). So when I exported that code to my other includes, I had to add stuff to put the “view” content into a “td” (table-data) tag. Then I went back and made Bill’s page work like that, too.

Code and “print” sections:

I found it very helpful in writing my includes to put as much logic and code as possible at the top, with strings that could vary assigned to variables. Then below that I would “print out” the page by switching to html mode and just using php to echo the variables in their proper places. If you build lists using “while” this practice has to be modified, but it’s still basically useful.

I like to have color, but besides that I am not paying a lot of attention to formatting. Once I got my generated views inside proper td tags, what I saw in the browser was okay with me.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s