PHP Classes

File: csa_db_example.php

Recommend this page to a friend!
  Classes of Roberto Andrade Fonseca   Cascade Select Associative   csa_db_example.php   Download  
File: csa_db_example.php
Role: Example script
Content type: text/plain
Description: Database example from two related tables in a RDBMS
Class: Cascade Select Associative
Generate two dependent HTML form select inputs
Author: By
Last change:
Date: 18 years ago
Size: 985 bytes


Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<h2>Using cascadeSelectAssoc with PostgreSQL Database</h2>
$mothersData = getMotherData("localhost","postgres","","csa_test_db","mothers","id_mother","mother","mothers");
$childrenData = getChildData("localhost", "postgres", "", "csa_test_db", "children","id_mother", "id_child", "child");

$o=new cascadeSelectAssoc("testForm");
<form name="testForm" method="post">
<table border=0 cellpadding=2 cellspacing = 2>
    <tr align=center>
        <td><?php $o->drawMother(); ?> </td>
    <tr align=center>
        <td><?php $o->drawChild("sel"); ?> </td>
    <input type="submit" value="Go">