Hi
I am inserting in database but there is error in query. i have array in which form data is stored and function recieve the array but data is not inserting in array. bellow is the code.
$insArr=array();
$insArr['first_name']=addslashes($_REQUEST['first_name']);
$insArr['last_name']=addslashes($_REQUEST['last_name']);
$insArr['email']=addslashes($_REQUEST['emailid']);
etc there is 46 fields in table
//now the function that insert in table is below
function mf_dbinsert($table,$data) // FUNCTION TO INSERT NEW RECORD IN SPECIFIED TABLE
{
$qry="INSERT INTO ".$table." values ";
foreach($data as $fld=>$val)
{
$qry.= $fld."='".$this->add_security($val)."',";
}
$qry=substr($qry,0,-1);
return $this->mf_query($qry);
}
solve this problem waiting for your reply
Thanks