Skip to content

Instantly share code, notes, and snippets.

/Get.php
Created Feb 15, 2017

Embed
What would you like to do?
<?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
You can’t perform that action at this time.