I had a while loop that populates for me 15 rows and 7 columns, and the input fields amongst them is what i want to use to make a post depending on the add one. the post is to enable me run a query and fetch out the rightful information that i need.
/*this is source code*/
<?php
require "library/connection/config_db.php";
$sql = "Select * from `".$config_table_4."`";
$query = mysql_query($sql)or die("Unable to query sql result resource". mysql_error());
echo "<table width='100%' cellpadding='1' cellspacing='1' border='1' bordercolor='red'>";
echo "<tr>
<td background='images/redbg.gif'>S/n</td>
<td background='images/redbg.gif'>FLAT</td>
<td background='images/redbg.gif'>Room #</td>
<td width='20%' background='images/redbg.gif'>
<table width='100%' cellpadding='2'>
<tr>
<td width='55%'>Check In Date</td>
<td>Check Out Date</td>
</tr>
</table></td>
<td background='images/redbg.gif'>Days</td>
<td background='images/redbg.gif'>Prices</td>
<td background='images/redbg.gif'>Statue</td>
<td background='image/redbg.gif'> </td>
</tr>";
while($extract = mysql_fetch_array($query))
{
$idkey = $extract['ID'];
echo "<tr>
<td><font class='whites'>".$idkey."</font></td>
<td><font class='whites'>".$extract["FLAT"]."</font></td>
<td><font class='whites'><input type='text' class='inputHidden' value='".$extract["Room_No"]."' name='obj1' id='obj1' readonly='yes' /></font></td>
<td><font class='whites'><table width='100%' border='1' cellpadding='1' cellspacing='0'>
<tr>
<td height='20'><input name='checkin_date' type='text' class='digitalboard' id='checkin_date' readonly='yes' /> <img src='images/dlcalendar_2.gif' alt='Click to add Check_In date' name='calendarImg1' id='calendarImg1' /></td>
<td><input name='checkout_date' type='text' class='digitalboard' id='checkout_date' readonly='yes' /> <img src='images/dlcalendar_2.gif' alt='Click to add Check_out date' name='calendarImg2' id='calendarImg2' /></td>
</tr>
</table></font></td>
<td><font class='whites'>";if(isset($_POST['add'])) { echo $from_date; } echo "</font></td>
<td><font class='whites'><s>N</s>".$extract["Prices"]."</font></td>
<td align='center'><font class='whites'>";if($pull['Check_In'] == $curDate)
{
echo $icon;
}
else if($pull['Check_Out'] == $curDate)
{
echo $icon;
}else { echo $icon; } echo "</td>
<td><input type='submit' name='".$nos."add' id='".$nos."add' value='Add' class='greenButton' onclick=\"window.location.href='indexadmin.php?page=reserv&action=add';\"></td>
</tr>";
//$nos++;
}
echo "</table>";
?>