forked from sharad16j/ResQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreceiptaction.php
39 lines (35 loc) · 1.23 KB
/
receiptaction.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
35
36
37
38
39
<?php
include "connection.php";
session_start();
$rollno = $_SESSION['rollno'];
$stream=$_POST['stream'];
$year=$_POST['year'];
$semester=$_POST['semester'];
$rupees=$_POST['rupees'];
$dfees=$_POST['cb1'];
$rfees=$_POST['cb2'];
$efees=$_POST['cb3'];
$ppfees=$_POST['cb4'];
$backlog=$_POST['cb5'];
$other=$_POST['cb6'];
$payvia=$_POST['payvia'];
if($payvia =="chkdd") {
$num=$_POST['num'];
$bank=$_POST['bank'];
$branch=$_POST['branch'];
$date=$_POST['date'];}
$comments=$_POST['Comments'];
if($payvia =="chkdd") {
$insert=mysqli_query($connection,"UPDATE receipt set stream='$stream',semester='$semester',year='$year',sumofrupee='$rupees',dfees='$dfees',rfees='$rfees',efees='$efees',ppfee='$ppfees',backlog='$backlog',other='$other',payvia='$payvia',comments='$comments',checkno='$num',bank='$bank',branch='$branch',dateofissue='$date' WHERE std_rollno='$rollno'");
}
else
{
$insert=mysqli_query($connection,"UPDATE receipt set stream='$stream',semester='$semester',year='$year',sumofrupee='$rupees',dfees='$dfees',rfees='$rfees',efees='$efees',ppfee='$ppfees',backlog='$backlog',other='$other',payvia='$payvia',comments='$comments' WHERE std_rollno='$rollno'");
}
if(isset($insert))
{
echo "Successfully updated";;
}
else{
echo "error";
} ?>