<?php
$aantal_rijen = $_POST['rows']; // How many rows in database
while ($i < $aantal_rijen){
if ($_POST['id' . $i] == "on"){ // check every checkbox that has the value on
$Host = "localhost";
$Gebruiker = "Test";
$Wachtwoord = "Test";
$DBNaam = "Test";
$Verbinding = mysql_connect ($Host, $Gebruiker, $Wachtwoord);
$Opdracht = "DELETE * FROM info WHERE id=='$i'";
if ( mysql_db_query ($DBNaam, $Opdracht, $Verbinding)){
echo "Ok $i";
} else {
echo "Mislukt";}
mysql_close ($Verbinding);
//mysql_select_db($database_connect, $connect);
//$sql = "DELETE * FROM info WHERE id='" . $i . "'";
//$Recordset1 = mysql_query($query_Recordset1, $connect) or die(mysql_error());
}
}
?>
$aantal_rijen = $_POST['rows']; // How many rows in database
while ($i < $aantal_rijen){
if ($_POST['id' . $i] == "on"){ // check every checkbox that has the value on
mysql_select_db($DBNaam,$Verbinding); //try this as this is the only thing missing from the way i conncet to mysql databases. I take it that $DBNaam is the database name if not change it to the one that is.
$Opdracht = "DELETE * FROM info WHERE id=='$i'";
if ( mysql_db_query ($DBNaam, $Opdracht, $Verbinding)){
echo "Ok $i";
} else {
echo "Mislukt";}
mysql_close ($Verbinding);
//mysql_select_db($database_connect, $connect);
//$sql = "DELETE * FROM info WHERE id='" . $i . "'";
//$Recordset1 = mysql_query($query_Recordset1, $connect) or die(mysql_error());
}
}