Skip to content

Instantly share code, notes, and snippets.

Created February 15, 2017 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/741cf9da1f65716d91bc08d176270fd4 to your computer and use it in GitHub Desktop.
Save anonymous/741cf9da1f65716d91bc08d176270fd4 to your computer and use it in GitHub Desktop.
<?php
include 'db.php';
$gettitle = $_GET['title'];
$query = mysql_query("SELECT * FROM url WHERE title = '$gettitle'");
$fetch = mysql_fetch_array($query);
$url = $fetch['url'];
if ($gettitle != $fetch['title']) {
header('Location:index.php');
}else{
header('Location:'.$url.'');
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment