Login   Register  
PHP Classes
elePHPant
Icontem

File: multi_example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of sujith nair  >  multi  >  multi_example.php  >  Download  
File: multi_example.php
Role: ???
Content type: text/plain
Description: Example file to use "multi"
Class: multi
Author: By
Last change:
Date: 2001-08-13 04:56
Size: 1,190 bytes
 

Contents

Class file image Download
<?php

// Include the connection file
include "connectrm.inc";

// Include the class file
include "class.multi.inc";


//Modify ths according to your requirements.

$sqltake="select COUNTRY from resume where RID='$rid'";
$restake=mysql_query($sqltake);
$myrowtake=mysql_fetch_array($restake);

// Define an Object
$obj = new multi;

?>


<!-- This is how it should be handled.
Here the first argument is the Value stored in the database field.
Second argument is the option value in the select form field.-->


<select name="country" multiple>
<option value="India" <?php echo $obj->sel($myrowtake["COUNTRY"],"India");?>>India</option>
<option value="Afghanistan" <?php echo $obj->sel($myrowtake["COUNTRY"],"Afghanistan");?>>Afghanistan</option>
<option value="Algeria" <?php echo $obj->sel($myrowtake["COUNTRY"],"Algeria");?>>Algeria</option>
<option value="Australia" <?php echo $obj->sel($myrowtake["COUNTRY"],"Australia");?>>Australia</option>
<option value="Austria" <?php echo $obj->sel($myrowtake["COUNTRY"],"Austria");?>>Austria</option>
<option value="Bahrain" <?php echo $obj->sel($myrowtake["COUNTRY"],"Bahrain");?>>Bahrain</option>
</select>