I need to retrieve URL's which are coming from a PHP file which include mysql variables. Unfortunately they are not being returned correctly.
Below is the html file I am linking to:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="index" href="toc1.php" type="application/json">
</head>
My toc1.php was file:
<?php
$username = $_GET['username'];
$papername = $_GET['papername'];
header('Content-Type: application/json');
$username = json_encode($username);
$papername = json_encode($papername);
?>
[{
"url": <?php echo '<a href="http://www.yoozpaper.com/cover.php?
username=' . $username . '&papername=' . $papername . '" ></a>';?>
},
{
"url": <?php echo '<a href="http://www.yoozpaper.com/tocindex.php?
username=' . $username . '&papername=' . $papername . '" ></a>';?>
},]