-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
43 lines (34 loc) · 1023 Bytes
/
index.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
<?php
session_start();
//======================================================================
// URL-Shortener
//======================================================================
//-----------------------------------------------------
// Main file of a front-end
// Do you like the simplicity, like I do?
// By Lukas Navickas
//-----------------------------------------------------
?>
<html>
<head>
<meta charset='utf-8'>
<title>URL-Shortener</title>
<link rel="stylesheet" type="text/css" href="css/css.css">
</head>
<body>
<div class="container">
<h1 class="title">Shorten your URL with us</h1>
<?php
if(isset($_SESSION['feedback'])) {
echo "<p>{$_SESSION['feedback']}</p>";
unset($_SESSION['feedback']); // Unset, because user should not see the same feedback every time
}
?>
<p></p>
<form action="pending.php" method="post">
<input type="url" name="url" placeholder="Enter your URL right here!">
<input type="submit" value="Shorten">
</form>
</div>
</body>
</html>