vinothaviji -1 Newbie Poster

Hi everyone...
I finished my work upto retrieve the data from database and stored values in table looks like the phpmyadmin table.

In table each row has one checkbox.if u click the check boxes the background color of the particular row is changed.

my php code:

if($color==1)
   {
    echo "<tr  bgcolor='#808080'>";
     echo "<td>" . '<input type="checkbox" name="check[]" />' . "</td>";
     echo "<td>".'<a href>Edit</a>'."</td>";
     echo "<td>" .'<a href>Delete</a>'."</td>"; 
    echo "
          <td>".$info['Area']."</td><td>"
               .$info['Property']."</td><td>"
               .$info['Bedroom']."</td><td>"
                 .$info['Bathroom']."</td><td>"
                .$info['Budget']."</td><td>"
                .$info['Footage']."</td><td>"
                 .$info['Parktype']."</td><td>"
                 .$info['Smoker']."</td><td>"
                 .$info['Petshave']."</td></span></tr>";

    $color="2";
   }

   else 
    {
   echo "<tr bgcolor='#D3D3D3'>";
   echo "<td>" . '<input type="checkbox" name="check[]" onclick="check();"/>' ."</td>";
      echo "<td>" .'<a href>Edit</a>'."</td>";
     echo "<td>" .'<a href>Delete</a>'."</td>"; 
         echo " <td>".$info['Area']."</td><td>"
               .$info['Property']."</td><td>"
                .$info['Bedroom']."</td><td>"
                .$info['Bathroom']."</td><td>"
                .$info['Budget']."</td><td>"
                .$info['Footage']."</td><td>"
                 .$info['Parktype']."</td><td>"
                 .$info['Smoker']."</td><td>"
                 .$info['Petshave']."</td> </tr>";
  
    $color="1";
   }

 
 
 } 
   echo "</table><br/>";

How to write the check function.Plz help me.