PHP Classes
elePHPant
Icontem

File: examples/example4.php

Recommend this page to a friend!
  Classes of Barton Phillips  >  PHP Site Class  >  examples/example4.php  >  Download  
File: examples/example4.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Site Class
Create database driven Web sites
Author: By
Last change:
Date: 8 months ago
Size: 523 bytes
 

Contents

Class file image Download
<?php
// Example4.php

require_once("../../../autoload.php");
$_site = json_decode(file_get_contents("mysitemap.json"));

ErrorClass::setNoEmailErrs(true);
ErrorClass::setDevelopment(true);

$S = new SiteClass($_site);

list(
$top, $footer) = $S->getPageTopBottom();

// Do some database operations
$S->query("select fname, lname from $S->memberTable");

$names = '';
while(list(
$fname, $lname) = $S->fetchrow('num')) {
 
$names .= "$fname $lname<br>";
}

echo <<<EOF
$top
<h1>Example 4</h1>
<p>
$names</p>
<hr>
$footer
EOF;