forked from codeb1ooded/RTI_Automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsave_replies.php
More file actions
41 lines (35 loc) · 860 Bytes
/
save_replies.php
File metadata and controls
41 lines (35 loc) · 860 Bytes
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
40
41
<?php
session_start();
$c=$_SESSION['prev_rti_id'];
$b=$_SESSION['quer'];
include 'ongoing_rti_option.php';
include 'config_database.php';
$data1="SELECT * FROM t2 WHERE id=".$c.";";
$query=mysqli_query($con,$data1);
while($b!=0)
{
$data3=mysqli_fetch_array($query);
$qno=$data3['q_no'];
$ans="ans".$b;
$sec="sec".$b;
$subsec="subsec".$b;
$date_rec="date_rec".$b;
$ans1=$_POST[$ans];
$subsec1=$_POST[$subsec];
$date_rec1=$_POST[$date_rec];
$sql1="SELECT * FROM article_sub_section WHERE Id=".$subsec1.";";
$row=mysqli_query($con,$sql1);
if($row)
{
$desc1=mysqli_fetch_assoc($row);
$desc=$desc1['Description'];
if(!$desc)
$desc="NULL";
}
$sql="INSERT INTO reply_queries VALUES('$c','$qno','$ans1','$desc','$date_rec1');";
mysqli_query($con,$sql);
$b--;
$qno++;
}
mysqli_close($con);
?>