-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInsertTicketDetails.php
More file actions
52 lines (36 loc) · 1.51 KB
/
InsertTicketDetails.php
File metadata and controls
52 lines (36 loc) · 1.51 KB
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
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html>
<header>
<link href ="main.css" rel="stylesheet"-->
</header>
<body>
<h3>A ticket has been opened. Thank you for the submission. You will receive a confirmation email shortly.</h3> <br/>
<?php
$sub_name = $_POST['sub_name'];
$request_type = $_POST['request_type'];
$analyst_name = $_POST['Analyst_Name'];
$priority_level = $_POST['priority_level'];
$daterange = $_POST['daterange'];
$request_desc = $_POST['request_desc'];
$_SERVER['LOGON_USER'];
include "Config.php";
$connectionInfo = array( "Database"=>DB_NAME, "UID"=>DB_USER, "PWD"=>DB_PASSWORD);
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
$sql = "exec ITChangeTracker.dbo.usp_insrtNewticket @sub_name='".$sub_name."', @request_type='".$request_type."', @analyst_name='".$analyst_name."', @priority_level='".$priority_level."', @daterange='".$daterange."', @request_desc='".$request_desc."'";
#Echo $sql;
sqlsrv_query($conn,$sql);
Sqlsrv_close($conn);
?>
<br><br><br><br>
<p> Click <a style="color:blue;" href="http://submititticket.com/IT_tracker/Default.php">here</a> to submit another ticket.
<br><br>
Click <a style="color:blue;" href="http://submititticket.com/IT_tracker/Tickethistory.php">here</a> to view previous tickets.
</p>
</body>
</html>