Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
divyanshugarg36 committed Oct 4, 2019
1 parent b889eb0 commit b8abc51
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 15 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# --------------------------`Hackathon 2k19`--------------------------
# -----------------------`Hackathon 2k19`-----------------------

## --------``Team RYAZ on Online Examination System``--------
## -------------``Team RYAZ on Online Examination System``-------------

### Team Members
----------------
1. Nandini Prashar – Team Leader
2. Rajvir Singh
3. Kamaldeep Kaur
3. Kamalpreet Kaur
4. Divyanshu Garg
5. Dashmeet Singh - Mentor
---------------------------------------------------------------------------------
## ------------------------------------INDEX-------------------------------------
## --------------------------------------INDEX---------------------------------------
1. ***Introduction***
1.1. Purpose
1.2. Document Conventions
Expand Down
18 changes: 18 additions & 0 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,21 @@ function login($username, $passwd)
echo "<script>console.log('Your Login Name or Password is invalid')</script>";
}
}

function getData($table)
{
global $conn;
$qry = "SELECT * FROM $table";
$exe = mysqli_query($conn, $qry);
$array = array(array());
$i = 0;
while ($cont = mysqli_fetch_array($exe)) {
for ($j = 0; $j <= 3; $j++) {
$array[$i][$j] = $cont[$j];
}
$i++;
}
return $array;
}
$dep = getData('departments');
echo json_encode($dep);
48 changes: 37 additions & 11 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,17 @@
<form method="POST">

<div>
<div class='input-field col s12'>
<input class='validate' type="text" name='sub_code' id='sub_code' required style="padding:" />
<label for='submit'>Subject Code</label>
<div class="input-field col s12">
<select name='sub_code' id='sub_code' required>
<option value="" disabled selected>Choose your Semester</option>
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
<option value="4">4th</option>
<option value="5">5th</option>
<option value="6">6th</option>
</select>
<label for='sem'>Semester</label>
</div>
</div>

Expand All @@ -64,18 +72,20 @@
</div>
</div>

<!-- <div>
<div>
<div class="input-field col s12">
<select name='sem' id='sem' required>
<option value="" disabled selected>Choose your option</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="" disabled selected>Choose your Semester</option>
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
<option value="4">4th</option>
<option value="5">5th</option>
<option value="6">6th</option>
</select>
<label for='sem'>Semester</label>
</div>
</div>
<br /> -->

<div>
<div class='input-field col s12'>
Expand Down Expand Up @@ -118,13 +128,29 @@
$('#modal-trigger').modal();
});
})(jQuery);


document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('select');
var instances = M.FormSelect.init(elems, options);
});

// Or with jQuery

$(document).ready(function() {
$('select').formSelect();
});
</script>

<!--JavaScript at end of body for optimized loading-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>


<!-- jQuery CDN -->
<script src="js/jquery-3.4.1.min.js"></script>

<!--JavaScript at end of body for optimized loading-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>


</body>

</html>
Expand Down

0 comments on commit b8abc51

Please sign in to comment.