UPDATE DATABASE
Posted: Sun Jan 16, 2011 4:53 am
I am new to php.
I will pass the values from one php form to another php form.Then how to get the variable name.
<?php
$result = mysql_query("SELECT * FROM att");
if(mysql_num_rows($result)>0)
{
$i=0;
while($row = mysql_fetch_array($result))
{
$del=0;
$regno=$row['regno'];
$fname=$row['fname'];
$i++;
?>
<tr>
<td width="18%" height="42" align="center"><?php echo $i;?></td>
<td width="26%" align="center"><?php echo $regno;?></td>
<td width="28%" align="center"><?php echo $fname;?></td>
<td width="28%" height="42" align="center"><input type="checkbox" name="<?php echo $regno;?>" value="0"/></td>
</tr>
<?php
if($_REQUEST['regno']==0)
{
$count=$count+1;
}
}
echo "$count";
}
I will pass the values from one php form to another php form.Then how to get the variable name.
<?php
$result = mysql_query("SELECT * FROM att");
if(mysql_num_rows($result)>0)
{
$i=0;
while($row = mysql_fetch_array($result))
{
$del=0;
$regno=$row['regno'];
$fname=$row['fname'];
$i++;
?>
<tr>
<td width="18%" height="42" align="center"><?php echo $i;?></td>
<td width="26%" align="center"><?php echo $regno;?></td>
<td width="28%" align="center"><?php echo $fname;?></td>
<td width="28%" height="42" align="center"><input type="checkbox" name="<?php echo $regno;?>" value="0"/></td>
</tr>
<?php
if($_REQUEST['regno']==0)
{
$count=$count+1;
}
}
echo "$count";
}