Clear

 

 

Begin Coding

 

 

 

 

 

Overview

While it didn't take the most time to do, I always find coding to be the most difficult component of the site-creation process. Creating the css and the structure of the page always ends up being, easily, the most time consuming aspect.

 

The ironic part of this is that through the coding beget the actual design solution. I had decided to have a second, dependent column on the left side for captions and other secondary information. This was decided upon during the structural coding of the CSS. While conventional, it solved the major problems of how to properly fit the content.

 

 

 

Overview of the coding structure

Shown below is the grid structure, in its final version, and how the divs fit, graphically, within the frame. The columnar structure is pretty simple; the header doesn't contain anything else besides the title image and the associated links. The container holds everything. Go here to access the stylesheet. Everything is consolidated into one.

 

This is a diagram of how the divs are structured on the page.

 

Shown here is the sitemap that I decided upon for the structure of the site.

 

 

The PHP Component

Making this work was the most time-consuming component of the coding process. Even now, I find the element of authoring PHP relatively elusive. What I'll do, then, is show you, in exact, all of the php code and their respective pages. I find it pretty challenging to explain this in pristine detail.

 

 

 

help_speakout.php (the page where comments are made and detailed):

<div id="nav">
   <div id="navLeft">
   <h2>Speak Out. </h2>
   <p>&nbsp; </p>
   <div id="comment2"></div>
   <p> 
   <p>What ideas do you have? How do you 
visualize a solar world? Do you think it's possible? 
   <div id="comment">
 <form action="commentadd.php" method="post">
   <p>Comment</p>
   <textarea name="comment" cols="25" rows="3"></textarea>
   <p>Name</p>
   <p>
   <textarea name="name" cols="25" rows="1" 
wrap="virtual"></textarea>
   </p>
 <p>&nbsp;</p>
   <p>
   <input name="submit" type="submit" value="Speak." />
   </p>
   </form>


cahDatabase.php (the page where commands are directed to the mySQL database. It acts like an intermediary):

 

<?php
        # FileName="Connection_php_mysql.htm"
        # Type="MYSQL"
        # HTTP="true"
        $hostname_cahDatabase = "db1359.perfora.net"; 
        $database_cahDatabase = "db233391404";
        $username_cahDatabase = "dbo233391404";
        $password_cahDatabase = "yourPassword";
        $cahDatabase = 
			mysql_pconnect($hostname_cahDatabase, 
			$username_cahDatabase, $password_cahDatabase) 
			or trigger_error(mysql_error(),E_USER_ERROR); 
?>

 

commentadd.php (the page where comments are added):

 

<?php
        session_start();
        require_once('cahDatabase.php');
        mysql_select_db($database_cahDatabase, 
			$cahDatabase);
        mysql_query("INSERT INTO solarcap(name, comment) 
			VALUES('$_POST[name]', '$_POST[comment]')");
        header('Location: help_speakout.php');
       ?>