++++Here is my code in to call the records from the list box that must be display in the datagrid.
<?php
$a = $_GET[$query1];
$b = $_GET[$query2];
mysql_connect("localhost", "root", "") or die ('Error'.mysqlerror());
mysql_select_db("sched");
$query="INSERT INTO try (section,grp) values ('".$a."','".$b."')";
mysql_query($query) or die ('Error Cannnot Insert Records!');
?>
<?php
// file: ex1.php
require 'class.eyemysqladap.inc.php';
require 'class.eyedatagrid.inc.php';
// Load the database adapter
$db = new EyeMySQLAdap('localhost', 'root', '', 'sched');
$dg = new EyeDataGrid($db); // Load the datagrid class
// Fetch all rows and columns from the `people` table
$dg->setQuery("*", "try");
// Print the table
$dg->printTable();
?>
++++code to insert a record.
<label>Section/Group:</label>
<?php
$link = mysql_connect("localhost", "root", "");
mysql_select_db("sched");
$query1 = "SELECT CONCAT(Section,Grp) AS sec FROM Section";
$result = mysql_query($query1);
print "<SELECT name=item>";
while ($line = mysql_fetch_array($result))
{
foreach ($line as $value)
{
print "<OPTION value='$value'";
}
print ">$value</OPTION>";
}
mysql_close($link);
print "</SELECT>";
?>
</span></p>
</form>
<form id="form3" method="post" action="">
<p>
<span class="style4">
<label>Subject</label>
</span>
<label></label>
<span class="align_left">
<?php
$link = mysql_connect("localhost", "root", "");
mysql_select_db("sched");
$query2 = "SELECT CONCAT(subjCode,subjDesc) as subj FROM Subject";
$result = mysql_query($query2);
print "<SELECT name=item>";
while ($line = mysql_fetch_array($result))
{
foreach ($line as $value)
{
print "<OPTION value='$value'";
}
print ">$value</OPTION>";
}
mysql_close($link);
print "</SELECT>";
?>
</span></p>
</form>