forked from codeb1ooded/RTI_Automation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsave_queries.php
More file actions
38 lines (32 loc) · 727 Bytes
/
save_queries.php
File metadata and controls
38 lines (32 loc) · 727 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
<?php
session_start();
$id=$_SESSION['id'];
$b=$_SESSION['no_of_queries'];
include 'config_database.php';
$data1="SELECT * FROM t2 WHERE id=".$id.";";
$query=mysqli_query($con,$data1);
$data2=mysqli_num_rows($query);
$a=$data2;
$c=$a;
while($b!=0)
{
$ques="ques".$b;
$map="map".$b;
$date_s="date_s".$b;
$ques1=$_POST[$ques];
$map1=$_POST[$map];
$date_s1=$_POST[$date_s];
$a++;
$sql="INSERT INTO t2(id,q_no,ques,map,date_sent)
VALUES('$id','$a','$ques1','$map1','$date_s1')";
mysqli_query($con,$sql);
$b--;
}
mysqli_close($con);
if ($c)
include 'ongoing_rti_option.php';
else
include 'select_option.php';
if(isset($_POST['gen_pdf']))
include 'gen_query_pdf.php';
?>