i'm writing a code below of php plz let me know the meaning of this stepwise,this also includes javascript, function SetAction(action,frm)
{
var i=0;
var check=false;
if(frm['items'],length)
{
for(i=0;i
{
if(frm.items[i].checked==true) {
check=true;
break;
}}}else {
if(frm.items.checked==true)
check=true;}
if(check==false)
document.getElementbyId("Error").innerHTML="Error:plz check any checkbox
";
else{
frm.Action.value=action;
frm.submit();}
$rec_id=$_GET['rec'];
$action=$_POST['Action'];
$arr_id=$_POST['items'];
$fld_id='fld_newsData';
if($action){switch($action){ case'Delete':del_records($arr_id,$fld_id); header("Location:index.php?query_str&msg=delete");
break;case'Activate':..........function del_records($arr_id,$fld_id){foreach($arr_id as $key=>$val){$sql=musql_query("DELETE FROM'tbl'WHERE$fld_id=$val'")
2007-06-08
03:18:54
·
5 answers
·
asked by
Dine
1