This topic is locked

mdetele in PHPR 4.1

9/20/2007 8:58:32 AM
PHPRunner General questions
Pfeiffer author

in my own functions I used the following source code in PHPR 4.0
function xx{

if (count (@$_POST["mdelete"]) < 1) {

die ("You have to mark at least one record.");

}
foreach(@$_POST["mdelete"] as $ind) {

$keys=array();

$P_Key = refine(@$_POST["mdelete1"][$ind-1]);

$SQL_Befehl = "Update tracking set archiv = '-' where tarcking_id = " . $P_Key;

SQL_execute ($SQL_Befehl);

}

}
In PHPR 4.1 the expression (@$_POST["mdelete"] is empty....
What's the new syntax in PHPR 4.1 to get it to run the same way ...
Best regards

Uwe Pfeiffer

Alexey admin 9/20/2007

Uwe,
mdelete[] array was replaced with selection[]
Here is your code adapted:

function xx{

if (count (@$_POST["selection"]) < 1) {

die ("You have to mark at least one record.");

}
foreach(@$_POST["selection"] as $val) {

$P_Key = refine($val);

$SQL_Befehl = "Update tracking set archiv = '-' where tarcking_id = " . $P_Key;

SQL_execute ($SQL_Befehl);

}

}

Pfeiffer author 9/20/2007

Thank you... it works
Best regards

Uwe Pfeiffer