hi all,

my question is very simple

following is my code:

<?

while($row=@mysql_fetch_array( $result1 ) )
{
$SrNo=$row["SrNo"]; echo $SrNo;
echo "<tr bgcolor=\"#dfeaf4\" valign=\"top\">
<td width=\10%\"><a href=\"edit.php?SrNo=".$row["SrNo"]."\">".$row["SrNo"]."</a> </td>
<td width=\"70%\">".$row["Company"]." </td>
<td width=\"20%\"><input type=\"checkbox\" name=\"SrCk\" >
</td>
</tr> ";
if ($SrCk=="on" )
$a[$SrNo]=1;
else
$a[$SrNo]=0;
}
if( isset($submit) )
{
$r=@mysql_fetch_array( $result2 );
$c= $r["count(*)"];
while ($c != 0 )
{
echo "$a[$c]";
$c--;
}
echo "$c";
?>

now here i get a list of records along with each record
i am getting a checkbox.......
now i want to make this code run for selected records so
whenver i do submit i should get a bunch of selected records
(i.e. selected from available each checkbox) .
so for marking selection of records dynamically i need to write javascript code like onCheck event which will do random
selection by setting a flag or something.

but i couldn't do it properly.........
getting stuck for putting code of javascript in PHP .


---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to