| Server IP : 172.64.80.1 / Your IP : 172.69.58.211 Web Server : Apache System : Linux mail.federalpolyede.edu.ng 5.10.0-32-amd64 #1 SMP Debian 5.10.223-1 (2024-08-10) x86_64 User : federalpolyede.edu.ng_idh35skikv ( 10000) PHP Version : 7.4.33 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/federalpolyede.edu.ng/httpdocs/jambreg/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: adisa
* Date: 2016-03-24
* Time: 06:01 PM
*/
session_start();
$matNo=$_SESSION['matNo'];
require('../connect.php');
$db=db_connect();
extract($_POST);
//Retain Data
//`state` = '$txtstate', `lga` = '$lga',`dob` = '$dob',`gsm` = '$gsm',`sex` = '$sex',`address` = '$address',`email` = '$email',`gNames`='$gName',`gGSM`='$gGSM',`gAddress`='$gAddress',`homeTown`='$home'
//if ($yoa=='Select Option...')$txtstate='';
//if ($lga=='') $lga=$hlga;
//if ($dob=='')$dob=$hdob;
//if ($gsm=='') $gsm=$hgsm;
//if ($sex=='') $sex=$hsex;
//if ($address=='') $address=$haddress;
//if ($email=='') $email=$hemail;
//if ($gName=='') $gName=$hgNames;
//if ($gGSM=='') $gGSM=$hgNames;
//if ($gAddress=='') $gAddress=$hgAddress;
//if ($home=='') $home=$hgAddress;
//if ($jambNo=='') $jambNo=$jambNo;
//End of data retain
echo $matNo.$yoa.$pn.$jambNo;
//die();
//$address=str_replace("'","''",$address);
//$address=str_replace("'","''",$address);
//$qry1=
// $result=$db->query("UPDATE `fedpoly`.`realdata` SET `state` = '$txtstate', `lga` = '$lga',`dob` = '$dob',`gsm` = '$gsm',`sex` = '$sex',`address` = '$address',`email` = '$email',`gNames`='$gName',`gGSM`='$gGSM',`gAddress`='$gAddress',`homeTown`='$home', `jambNo`='$jambNo' WHERE `realdata`.`matNo` ='$matNo'");
//echo "INSERT INTO `jambundis` (`sn`, `matNo`, `yoa`, `paymentNo`, `jambNo`) VALUES (NULL,'$matNo','$yoa','$pn','$jambNo')";
//die();
$sql=$db->query("select * from jambundis where matNo='$matNo'")->rowCount();
if ($sql==1){
$db->query("UPDATE jambundis SET yoa='$yoa',paymentNo='$pn',jambNo='$jambNo' where matNo='$matNo'");
}
$result=$db->prepare("INSERT INTO `jambundis` (`sn`, `matNo`, `yoa`, `paymentNo`, `jambNo`) VALUES (NULL, ?,?,?,?)");
$result->execute([$matNo,$yoa,$pn,$jambNo]);
if ($result){
header('location:'.'start_process.php?id=1');
}else{
header('location:'.'start_process.php?id=2');
}
//$Query = "SELECT * FROM coursepool WHERE dept=? and levelID<=? and semester=? and instr('$SelSubjects',courseCode)>0";
//$stmt = $pdo->prepare($Query);
//$stmt->execute([$dept,$levelID,$semester]);
?>