= 200){ foreach ($_POST as $key => $value) { if(in_array($key,array("amount","whatsapp","phone","email","permanentaddress","officeaddress","designation","dob","gender","passyear","department","name","razorpay_payment_id","date"))){ $thevalues = '\''.htmlspecialchars($value).'\','.$thevalues; $thefields = '`'.htmlspecialchars($key).'`,'.$thefields; } } $thevalues = rtrim($thevalues,','); $thefields = rtrim($thefields,','); if(mysqli_query($link,"INSERT INTO `rnpur_alumni`($thefields) VALUES ($thevalues)")){ $lastid = $_SESSION['success'] = mysqli_insert_id($link); mysqli_query($link,"UPDATE `rnpur_alumni` SET bearing = 'Member' WHERE id = '$lastid'"); if($_POST['reddon']<=0){ header ('location:http://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]); die(); } } else { $_SESSION['failed'] = 'failed'; } } } if((isset($_GET['donation'])) || ($_POST['reddon']>0)){ unset($thevalues); unset($thefields); if(isset($_POST['reddon'])){$_POST['amount']=$_POST['reddon'];$_POST['memberid']="RNPURALU".$_POST['passyear'].$lastid;} foreach ($_POST as $key => $value) { if(in_array($key,array("amount","email","phone","department","name","memberid","razorpay_payment_id","date"))){ $thevalues = '\''.htmlspecialchars($value).'\','.$thevalues; $thefields = '`'.htmlspecialchars($key).'`,'.$thefields; } } $thevalues = rtrim($thevalues,','); $thefields = rtrim($thefields,','); if(mysqli_query($link,"INSERT INTO `rnpur_alumni_donation`($thefields) VALUES ($thevalues)")){ $lastid = $_SESSION['success'] = mysqli_insert_id($link); mysqli_query($link,"UPDATE `rnpur_alumni_donation` SET date = '$date' WHERE id = '$lastid'"); header ('location:http://'.$_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]); die(); } else { $_SESSION['failed'] = 'failed'; } } } } $encoder = "ertrhgfjdtrjthgdrghdhhhcfgdh"; function encode($string,$key) { $key = sha1($key); $strLen = strlen($string); $keyLen = strlen($key); for ($i = 0; $i < $strLen; $i++) { $ordStr = ord(substr($string,$i,1)); if ($j == $keyLen) { $j = 0; } $ordKey = ord(substr($key,$j,1)); $j++; $hash .= strrev(base_convert(dechex($ordStr + $ordKey),36,22)); } return $hash; } $formaction= $url.'?combyper='.encode($combyper,$encoder).'&combyamount='.encode($combyamount,$encoder).'&ref='.'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>

Alumni Section