Ok, I understand, but that wasn't what I was trying to ask...
I know how to use arrays in other programming languages, but using it with mysql is a little confusing.
So I have
<?php
include 'connect.php';
$id = $_POST['?'];
//I don't know what you mean by php implode.
$status = ??
foreach(id[]??){
$query = mysql_query("SELECT * FROM Children WHERE id='$id[?]''") or die("ERROR");
$numrows = mysql_num_rows($query);
if ($numrows!=0){
while ($row = mysql_fetch_assoc($query)){
$current = $row['id'];
}
}
if ($current == 2){
mysql_query("UPDATE Children SET status=1 WHERE id = '$status[$id]'");
} else if ($current == 1){
mysql_query("UPDATE Children SET status=2 WHERE id = '$status[$id]'");
}
}
?>
Am I close to achieving this?
BTW Not all of my code showed up on the previous post