Login   Register  
PHP Classes
elePHPant
Icontem

File: adv_linked_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Carlos Falo Hervás  >  linked_select  >  adv_linked_example.php  >  Download  
File: adv_linked_example.php
Role: Example script
Content type: text/plain
Description: A little example for the adv class
Class: linked_select
Multiple dependent (linked) <select> tags
Author: By
Last change:
Date: 2001-05-14 14:56
Size: 779 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<? require("mysql_conn.php");?>
<? 
require("mysql_recordset.php");?>
<? 
require("adv_linked_select_class.php");?>
<? $conn 
= new mysql_conn("localhost","bis","interactive","test") ; ?>
<? $conn
->init() ; ?>
<? $ls 
= new linked_select("conn",1) ;?>
<? $ls
->add_select("fam","tbl_fams","id","name","","Familia de productos",0) ; ?>
<? $ls
->add_select("prod","tbl_products","id","product","famid","Productos",0) ; ?>
<? $ls
->add_select("mod","tbl_mods","id","mod","pid","Modelo",0) ; ?>
<html>
<head>
    <title>Untitled</title>
<? $ls->create_javascript() ;?>
</head>

<body>
<form name="test">
<?
$ls
->create_select(0) ;
$ls->create_select(1) ;
$ls->create_select(2) ;
?>
</form>
</body>
</html>