Hi,
I fetched rows from db which stores 0 and 1 for "active" and "inactive" states and display it using a for loop .. i just want to change active links to inactive and vice versa on clck ..... I am having problems transfering values to script and back .. would be greatful if some kind hearted are ready to help..
echo'<a href="" onclick="togglevalue('$row['id']','$row['active']');">';
if ($row['active']==0)
echo "Inactive";
else
echo"Active";
echo '</a>
<script type=javascript>
function togglevalue(id)
{
var conBox = confirm("Are you sure you want to make this Member"+(Need Active or Inactive) ;
if(conBox){
location.href="./toggleAcive.php?id="+id ;
}
}
</script>