PHP Classes

File: flashPash.recordset.demo.php

Recommend this page to a friend!
  Classes of Simon McKenna   flashPash   flashPash.recordset.demo.php   Download  
File: flashPash.recordset.demo.php
Role: Example script
Content type: text/plain
Description: PHP script for Recordset demo
Class: flashPash
Database automation for Flash and PHP
Author: By
Last change:
Date: 21 years ago
Size: 1,949 bytes
 

Contents

Class file image Download
<?php

/*==-==-==-==-==-==-==-==-==-==-==-==-==-==-==+
 | flashPash PHP script for recordset demo |
 +==-==-==-==-==-==-==-==-==-==-==-==-==-==-==+
 | version 1.0 *RC1* |
 | |
 | last update on 2003-07-02 by si*sshnug.com |
 | |
 | Copyright (c) 2003, Simon Mckenna |
 | All rights reserved |
 +==-==-==-==-==-==-==-==-==-==-==-==-==-==-==+
 | source best viewed with tab space set to 2 |
 +==-==-==-==-==-==-==-==-==-==-==-==-==-==-==*/

/*
This is a demo of how you can use the FlashPashServerClass from a HTTP posted XML document.
See flashPash.PHP.demo.php for a demo of how to use FlashPashServerClass from just within PHP.

for ease of use this demo is passing database access parameters over HTTP, you should *NOT*
do this in a live production environment, it's an invitation to be hacked.

Please note this script assumes you have your PHP.INI pathed so it can
see the flashPash root directory. By default the flashPash directory
is installed into the PHP 'includes' directory. eg. C:\PHP4\includes
So you need only set PHP.INI include_path to ..."C:\PHP4\includes"...
*/
require_once 'flashPash/flashPash.php';
require_once
'flashPash/flashPash.recordset.php';

/* create new instance of class object */
$fpDemo = new FlashPashServerClass( FP_SOURCE_XML, 'mysql', 'localhost', 'flashpashtest', 'user', 'userpass', FP_LOG_HTML );

/* enforce role checking...this must validate against flashPash.roles.xml */
$fpDemo->checkRole = true;
$fpDemo->role = 'recordsetDemo';

/* point our logfile so the public can see it */
$fpDemo->logfile = $_SERVER[ 'DOCUMENT_ROOT' ] . '/flashPash/demo/logs/log.recordset.demo';

/* let flashPash do it's thang */
$fpDemo->execute();

/* return result back to client and you're done! */
$fpDemo->dumpXML();

?>