$url = $_GET['route']; // Connect to the database and select row that matches the route. require_once('../assets/scripts/gmaps.php'); mysql_select_db($database_gmaps, $gmaps); $query = "SELECT * FROM routes WHERE ref LIKE '$url'"; $data = mysql_query($query); // Create associative array comprised of that row's data $row_data = mysql_fetch_array($data); ?>