Hello folks, ve been wandering around what could be the problem with my script. All my Data from my form are not getting stored in my Db, i mean some are stored why some are not. i dont know where the problem is. my code below
`
<?php include ('config.php'); function getStatus($trnxid, $amt) { $query = "SELECT trnxid, amount FROM transactions WHERE trnxid= '$trnxid'"; $result = mysql_query($query) or die(mysql_error()); $res = mysql_fetch_assoc($result); if($res != false) { $t_trnxid = $res['trnxid']; $t_amt = $res['amount']; } else { $t_trnxid = NULL; $t_amt = NULL; } if ($trnxid == $t_trnxid AND $amt== $t_amt){ return True; } else{ return False; } } $trxnid= isset($_POST['trxnid']) ? $_POST['trxnid'] : time(); $amount= isset($_POST['amt']) ? $_POST['amt'] : 1000; if (isset($_POST['trxnid'])){ $name= isset($_POST['RegFullName']) ? $_POST['RegFullName'] : ""; $org= isset($_POST['RegOrganization']) ? $_POST['RegOrganization'] : ""; $pos= isset($_POST['RegPosition']) ? $_POST['RegPosition'] : ""; $officetel= isset($_POST['RegOfficeTel']) ? $_POST['RegOfficeTel'] : ""; $mobile= isset($_POST['RegMobile']) ? $_POST['RegMobile'] : ""; $fax= isset($_POST['RegFax']) ? $_POST['RegFax'] : ""; $email= isset($_POST['RegEmailaddress']) ? $_POST['RegEmailaddress'] : ""; $add= isset($_POST['RegAddress']) ? $_POST['RegAddress'] : ""; $trans=isset($_POST['RegTranYes']) ? $_POST['RegTranYes'] : ""; $transHotel=isset($_POST['RegHotelYes']) ? $_POST['RegHotelYes'] : ""; $regpol1=isset($_POST['RegPol1']) ? $_POST['RegPol1'] : ""; $regpol2=isset($_POST['RegPol2']) ? $_POST['RegPol2'] : ""; $profile=isset($_POST['RegOrgProfile']) ? $_POST['RegOrgProfile'] : ""; $picture=isset($_POST['RegPic']) ? $_POST['RegPic'] : ""; $uprofile="upload/orgfile/" . $profile; $upicture="upload/" . $picture; $query= "INSERT INTO registration VALUES('', '$name', '$org', '$pos', '". mysql_escape_string($add). "', '$upicture', '$uprofile', '$officetel', '$mobile', '$fax', '$email', '$regpol1', '$regpol2', '$trans', '$transHotel', '$trxnid')"; $result=mysql_query($query) or die(mysql_error()); $query = "INSERT INTO transactions VALUES('', '$trxnid', '$amount', '', '')"; $result= mysql_query($query) or die(mysql_error()); } $trnxvalid= False; $_SESSION['amount']= $amount; $_SESSION['txnref']= $trxnid; if (isset($trxnid) AND isset($amount)){ $trnxvalid=getStatus($trxnid, $amount); } $response= ($trnxvalid) ? "Validity check passed" : "Validity Check Failed, try again"; ?>`
only this Data is stored ($name, $upicture, $uprofile , $regpol1 , $regpol2 , $trxnid )
Please anyone with ideas where the prob is coming from