i am using the following code to submit a form:
<script>
function marktaskcomplete(){
document.forms["markcomplete"].submit();
}
</script>
<?
if ($_POST['markcompletevalue']=='yes'){
include "dbconnect.php";
$taskid=$_POST['taskid'];
$query="UPDATE tasks SET status='0' WHERE uid='$id' AND id='$taskid'";
$result=mysql_query($query);
if ($result){
echo "<script>location.href='?goto=taskmanager'</script>";
}else{
echo"fail";
}
mysql_close;
}
?>
and when i try to submit more then 1 form with it, it doesnt work. It will only work for the first.
can anyone help? thank you in advance