Hi everyone!
I have a process script that looks like this:
include_once "ez_sql.php";
$clear = $POST['clear'];
reset($clear);
echo('Student ID -> ' . $POST['id'] . '<br><br>');
echo "key clear is key($clear)";
foreach($clear as $clr)
{
if($clr==1)
{
$query = "DELETE FROM student_schedule WHERE
student_schedule_studentid=" . $_POST['id'] . " AND
student_schedule_schedid=". key($clear) .";";
echo($query."<br><br>");
$db->query($query);
I don't understand $_POST['clear'] and reset($clear). I intuit that this is an array. How would I echo out what the values of the array are (since the script is not working)? I tried echo "key clear is key$(clear)" but that isn't working. As you can see, we are trying to delete a record based on 2 fields.
Thanks.