Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php3

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  >  example.php3  >  Download  
File: example.php3
Role: Example script
Content type: text/plain
Description: an example
Class: linked_select
Multiple dependent (linked) <select> tags
Author: By
Last change:
Date: 2001-02-07 11:03
Size: 831 bytes
 

Contents

Class file image Download
<? require("mysql_conn.php");          ?>
<? 
require("mysql_recordset.php");     ?>
<? 
require("mysql_command.php");       ?>
<? 
require ("linked_select_class.php") ;?>
<?
  
// Initializing data access
  
$conn = new mysql_conn("localhost","bis","interactive","test") ;
  
$conn->logfile $dirapp "logs/logfile" ;
  
$conn->init() ;

  
// Generate the new linked_select instance
  // IMPORTANT: first param is a STRING - the name of the mysql_conn OBJECT
  // NOT THE OBJECT ITSELF
  
$ls = new linked_select("conn","testselect","table1","id","name",1,"table2","id","name","parentid",0) ; ?>
<html>
<head>
<title>LINKED SELECT EXAMPLE</title>
<? $ls->create_javascript() ;?>
</head>
<body>
<form name="testform">
<? $ls->create_base_select() ;?><br>
<? $ls->create_sub_select() ;?>
</form>
</body>
</html>