-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreatecoding1.php
More file actions
50 lines (46 loc) · 1.18 KB
/
createcoding1.php
File metadata and controls
50 lines (46 loc) · 1.18 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
<?php
include_once("./session.php");
include_once("./top_bar.php");
include_once("./menubaradmin.php");
$cname = $_POST["cname"];
$startdate = $_POST["startdate"];
$starttime = $_POST["starttime"];
$enddate = $_POST["enddate"];
$endtime = $_POST["endtime"];
$start = $startdate." ".$starttime;
$end = $enddate." ".$endtime;
$x=0;
$host = $_SESSION['host'];
$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
$dbname = $_SESSION['dbname'];
$con1 = mysqli_connect($host, $user, $pass, $dbname);
mysqli_query($con1,"insert into Coding values (" .$x. ",'" .$cname. "','".$start."','".$end."')");
mysqli_close($con1);
?>
<br>
<form action="./createcoding2.php" method="post" enctype="multipart/form-data">
<table>
<tr>
<td>Question file : </td>
<td><input type="file" name="uploaded1"></td>
</tr>
<tr>
<td>Solution File</td>
<td><input type="file" name="uploaded2"></td>
</tr>
<tr>
<td>User Input File</td>
<td><input type="file" name="uploaded3"></td>
</tr>
<tr>
<td>Question Id</td>
<td><input type="text" name="qid"></td>
</tr>
<tr>
<td>Marks</td>
<td><input type="text" name="marks"></td>
</tr>
<tr><td><input type='submit' name='submit' value='Submit'></td></tr>
</table>
</form>