-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmap.php
51 lines (51 loc) · 1.99 KB
/
map.php
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
<?php
require ('core.inc.php');
include 'connect.php';
if (loggedin()) {
include ('headerlogin.php');
}else {
include ('header.php');
}
?>
<title>Map to learning PHP to become an advanced Developer | The Programmer's Hub </title>
<script>
function searchTut () {
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}else {
xmlhttp = new ActiveObject('Microsoft.XMLHTTP');
}
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById('result').innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open('GET', 'phpsearchtutorials?tut='+document.getElementById('tuts').value, true)
xmlhttp.send ();
}
</script>
<div class="text-xs-center" style="margin-top: 5px;">
<div class="text-center">
<div class="col-md-6 container">
<h2 style="font-size: 18px; font-family: geogia; color: indigo;">Click on topic to enter classroom | PHP</h2>
<p style="font-family: georgia;">New tutorial videos are added as often as possible till course is complete <span style="color: red;">*</span></p>
<p class="col-md-6 center">
<form action="phpsearchtutorials" method="get">
<div class="md-form input-group">
<input type="text" id="tuts" class="form-control inherit" name="tut" onkeyup="searchTut();" placeholder="Search tutorial" required>
<button class="btn btn-indigo btn-md" type="submit"><i class="fa fa-search"></i></button>
</form></div>
</p>
</div>
</div></div>
<div class="center " id="result"></div><hr class="container">
<div class="col-md-12"></div>
<?php
$sql= "SELECT * FROM phptuts ORDER BY id ASC";
$result = mysqli_query($link, $sql);
while (@$row = mysqli_fetch_array($result)) {
echo '
<div class="container-fluid col-md-6 center"><i class="fa fa-circle-thin grey-text"></i><a style="margin-left: 22px; font-family: Georgia; font-size: 18px;" href="phpclassroom?tut='.$row['id'].'">'.$row['title'].'</a></div>';
}
include 'footer.php';
?>