Ok So I have a html page set. When I click a button it shows another html page but inside a fancybox. In that page I have multiple links. Whne I click one of those links I want it to go there on the normal page not from within the fancybox
Example below
First php page
<?php
session_start();
require_once 'connect.php';
?>
<html>
<head>
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<!-- Add fancyBox -->
<link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<style type="text/css">
html {
background: url(images/main.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.container:before {
content: '';
position: absolute;
top: -8px;
height: auto;
right: -8px;
bottom: -8px;
left: -8px;
z-index: -1;
background: rgba(0, 0, 0, 0.08);
border-radius: 4px;
}
.dashboard {
text-align: center;
font-family: ‘Lucida Console’, Monaco, monospace;
}
.container {
clear: both;
margin-right: auto;
margin-left: auto;
position: relative;
bottom: 0px;
height: auto;
margin: 50px auto;
padding: 20px 50px 20px;
width: 700px;
background: transparent;
border-radius: 3px;
-webkit-box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.a {
text-decoration: none;
}
</style>
</head>
<body>
<div class='container'>
<div class='dashboard'>
<div class='pure-button'><a class="fancybox fancybox.iframe" href="test1.php" target="_parent">Hospital Orders</a></div>
<br>
<div class='pure-button'><a class="fancybox fancybox.iframe" href="test2.php" target="_parent">Patient Orders</a></div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox();
});
</script>
</body>
</html>
this is the Test1.php page
<?php
session_start();
require_once "connect.php";
?>
<html>
<head>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="tablecss.css">
<style type="text/css">
html {
background: url(images/main.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.container:before {
content: '';
position: absolute;
top: -8px;
height: auto;
right: -8px;
bottom: -8px;
left: -8px;
z-index: -1;
background: rgba(0, 0, 0, 0.08);
border-radius: 4px;
}
.dashboard {
text-align: center;
font-family: ‘Lucida Console’, Monaco, monospace;
}
.container {
clear: both;
margin-right: auto;
margin-left: auto;
position: relative;
bottom: 0px;
height: auto;
margin: 50px auto;
padding: 20px 50px 20px;
width: 700px;
background: transparent;
border-radius: 3px;
-webkit-box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0 0 200px rgba(255, 255, 255, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body>
<div class="container">
<?php
include 'linksdb.php';
?>
</div>
<br>
<div class='new'>
<form action="savepending.php" method='POST'>
</form>
</div>
</body>
</html>
As you can see, when It opens up the test1.php it is also loading the linksdb.php Insdie that there are mnay links.
<?php
$tech = $_SESSION['username'];
//$query = mysqli_query($con, "SELECT * FROM newworders WHERE tech = '".$tech."'") or die(mysqli_error()); // get any actual error
$query = mysqli_query($con, "SELECT * FROM newworders WHERE test = 'Yes' AND tech = '$tech'");
echo "<table id='tb' border='1'>
<th>Test These</th>
<tr class='head'>
<th>First Name</th>
<th>Last Name</th>
<th>time</th>
<th>space</th>
<th>noise</th>
<th>Complete</th>
</tr>";
while($row = mysqli_fetch_array($query)) {
echo "<tr>";
echo "<td>" . '<a href="orderpage.php?uid=' . $row['ID'] . '">' . $row['first'] . '</a><br />' . "</td>";
echo "<td>" . '<a href="orderpage.php?uid=' . $row['ID'] . '">' . $row['last'] . '</a><br />' . "</td>";
echo "<td>" . '<a href="orderpage.php?uid=' . $row['ID'] . '">' . $row['time'] . '</a><br />' . "</td>";
echo "<td>" . '<a href="orderpage.php?uid=' . $row['ID'] . '">' . $row['space'] . '</a><br />' . "</td>";
echo "<td>" . '<a href="orderpage.php?uid=' . $row['ID'] . '">' . $row['noise'] . '</a><br />' . "</td>";
echo "<td>" . "<input type='checkbox' value='Yes' name='complete'" . '<br />' . "</td>";
}
?>
Now if I click any of those links in the linksdb.php I want it to go to the link on the parent page. Not inside of the fancybox