-
Notifications
You must be signed in to change notification settings - Fork 0
/
testcode.php
47 lines (40 loc) · 887 Bytes
/
testcode.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
<?php
//echo "Hello World";
?>
<!DOCTYPE html>
<html>
<body>
hey
<? /* php
session_start();
function redirect($url, $statusCode = 303)
{
header('Location: ' . $url, true, $statusCode);
die();
}
unset($_SESSION['id']);
session_destroy();
redirect("index.html");
exit;*/
?>
<?php
session_start();
function redirect($url, $statusCode = 303)
{
header('Location: ' . $url, true, $statusCode);
die();
}
$user='root';
$pass='';
$dbname='projecthub';
$topic = 'abc';
$conn = new mysqli('localhost',$user,$pass,$dbname) or die("Connection failed");
$sql = "SELECT * FROM project where id=1" ;
$result = $conn->query($sql);
$row=mysqli_fetch_assoc($result);
echo $row["title"];
echo "Happy";
// echo "Happy";
?>
</body>
</html>