-
Notifications
You must be signed in to change notification settings - Fork 2
/
ogop_reg_php.php
34 lines (29 loc) · 996 Bytes
/
ogop_reg_php.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
session_start();
ob_start();
if($_SESSION["email"] == "")
{
header("location:login.php?err=em");
}
?>
<?php
include("connection.php");
$topic=$_POST['topic'];
$email=$_SESSION["email"];
$col_nm=$_POST['colnm'];
$sem=$_POST['sem'];
$asme_id=$_POST['asmeid'];
$amount=$_SESSION["cost"];
$sql="Select * from details where email='$email'";
$res=mysqli_query($con,$sql);
$row1=mysqli_fetch_row($res);
$name = $row1[0]." ".$row1[1];
$sql = "Select max(reference_number) from ogop";
$res = mysqli_query($con,$sql);
$row = mysqli_fetch_row($res);
$refno = $row[0] + 1;
$sql="INSERT INTO ogop values('$email','$name','$col_nm','$sem','$asme_id','$refno','$amount')";
$res=mysqli_query($con,$sql);
//Payment gateway redirection
header("location:main.php?err=done");
?>