hey frnds…happy nw yr first of all…n nw have a glance at my prb
code is displaying only else result i.e. msg sent on the screen regardles of my entry…y this is happening…plsss help me out…
this is part of my code…
if(isset($_POST[‘chkselectmodelpics’]))
{
foreach($_POST[‘chkselectmodelpics’] as $regid)
{
$reason=$POST['reason’.$regid];
$ts=date("YmdHis",time());
$admin=$_SESSION['admin'];
$objectIndex = "CRQST, CLGIN";
$alias=" r,c ";
$fields = "r.product, c.Username";
$otherclause='';
$whereclause = " where r.Client_Id=c.id and r.Request_Code='".$hdnrequestid."'";
$rs_client=_getRows($objectIndex, $fields, $whereclause, $otherclause,$alias);
$productname=$rs_client[0][0];
$client_name=$rs_client[0][1];
$cmbclient=$_POST['cmbclient'];
// [hdnrequestid] => RE000001 [cmbclient] => 5
$objectIndex = "NMDLTS";
$fields = "RegID";
$whereclause = " where RequestID='$hdnrequestid' and RegID=$regid";
$rs_model = _getRowCount($objectIndex, $fields, $whereclause, $otherclause, $alias);
//print $rs_model;
if($rs_model<1)
{
$objectIndex1 = "CLTR";
$fields1 = "RequestID,RegID,ts,status,ClientId,calldate,admin";
$values1 = "'$hdnrequestid',$regid,'$ts','$reason','$cmbclient','$d','$admin'";
$whereclause1 = "";
$actionFlag1 = "A";
execute_Query($objectIndex1, $fields1, $values1, $whereclause1, $actionFlag1);
$objectIndex = "MDLTS";
$fields = "RequestID,RegID,ts,status,ClientId,calldate,bdname";
$values = "'$hdnrequestid',$regid,'$ts','$reason','$cmbclient','$d','$bd'";
$whereclause = "";
$actionFlag = "A";
execute_Query($objectIndex, $fields, $values, $whereclause, $actionFlag);
if($reason=='P')
$comments=$client_name."---".$productname."---Pic sent";
//elseif($reason=='N')
//{$comments= $client_name."---".$productname."--- Number changed";
//}
else
$comments=$client_name."---".$productname."--msg sent";
$objectIndex = "CMT";
$fields = "userid,lusername,description,ts,modeltype";
$values = "$regid,'$admin','$comments','$ts','$lstsex'";
execute_Query($objectIndex, $fields, $values, $whereclause, $actionFlag);
}
$objectIndex = "REGM";
$actionFlag = "E";
$whereclause="where RegID=".$regid;
$fields = "called=called+1";
$values="";
execute_Query($objectIndex, $fields, $values, $whereclause, $actionFlag);
$objectIndex = "CRQST";
$actionFlag = "E";
$whereclause="where Request_Code ='$hdnrequestid'";
$fields = "shortlist='c'";
$values="";
execute_Query($objectIndex, $fields, $values, $whereclause, $actionFlag);
$objectIndex = "NSHRT";
$actionFlag = "D";
$whereclause="where RequestID='$hdnrequestid' and RegID=$regid and ClientId='$cmbclient'";
$fields = "";
$values="";
execute_Query($objectIndex, $fields, $values, $whereclause, $actionFlag);
}}