-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
46 lines (46 loc) · 1.41 KB
/
index.php
File metadata and controls
46 lines (46 loc) · 1.41 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
<!DOCTYPE html>
<html>
<head>
<meta charset=UTF-8>
<title>URL Shortener - lukeo.link</title>
<meta name=viewport content=width=device-width,initial-scale=1>
<link rel=stylesheet href=style.css type=text/css>
</head>
<body><div id=body>
<div id=top class=center>
<p>Looking for <a href=https://lukeogburn.com/>lukeogburn.com</a>?</p>
</div>
<div id=main>
<h2 class=center>URL SHORTENER</h2>
<form method=POST action=function.php>
<input type=text name=url autofocus></input>
<button type=submit>SHORTEN</button>
</form>
<?php
if(isset($_GET["error"])){
switch($_GET["error"]){
case "stmt":
echo "<p class='center error'>Error creating short URL</p>";
break;
case "hps":
echo "<p class='center error'>Please enter a valid URL</p>";
break;
case "unr":
echo "<p class='center error'>That URL wasn't recognized</p>";
break;
}
}
?>
</div>
<!--
<div class=fileUpload>
<form action="" method=POST>
<input type=file name=fileUpload[] multiple>
<button type=submit>
</form>
</div>
-->
<!--<input type=checkbox id=boo>
<div id=cookie><p><label for=boo>This site stores security cookies that do not identify or track you</label></p></div>-->
</div></body>
</html>