Log in

View Full Version : Captures data from dynamic form/table



devil_vin
09-22-2007, 03:51 PM
Hi...guys!I have a dynamic form which fetch data from database and would like to captured it with $_POST when user selected.Let said I have fetched out 7 records,how can the name and screeningTime of a particular record being captured?It is urgent for me,really hopes for your generious help...




<?
if (isset($_SESSION['gmemberid'])) {

$result = mysql_query(sprintf('SELECT name,category,screeningTime FROM %s
LIMIT 7', $tbl_name)) or die('Cannot execute query.');

$tbl_name = "movie";
//$numrow = mysql_num_rows($result);


while ($rows = mysql_fetch_assoc($result)) {
echo '<table width="100%" border="0"><tr><td height="68">
<table width="100%" height="47" border="0">
---------------------------------------------------------------------------------------------------------<br>';

echo '<strong>' . $rows['name'] . ' (' . $rows['category'] . ')
<br></strong>';
foreach (explode(',', $rows['screeningTime']) as $time) { ?>
<label>
<input type="radio" value="<?php echo $time; ?>">
<?php echo $time; ?>&nbsp;&nbsp;&nbsp;
</label>
<?php } ?>
<?
}


}
?>