Forum Moderators: coopster
I came up with the code below for the quick search div and the two php pages that are supposed to make this happen.
The good news is I can display the results from the external site in the iframe based on the number I entered into the quick search div.
The bad news is that result.php only shows the css and the iframe, but doesn't show anyhting else (includes, etc) although the code for it is there
What did I do wrong? Am I missing something or is there a better way to get this to work?
Thank you all in advance!
Quick Search DIV on EVERY page within site
<form name="form" method="get" action="jump.php">
<input name="xyz" type="text" />
<input type="submit" name="submit" value="Search" />
</form>
JUMP.PHP code
<?php
if (isset($_GET['xyz']))
{
$search = $_GET['xyz'];
echo "<meta http-equiv=\"Refresh\" content=\"0; url=http://www.mydomain.com/result.php?xyz=" . $search . "\">";
}
else
{
echo "enter a search term";
}
?>
RESULT.PHP code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- #BeginTemplate "temp.dwt" -->
<head>
<!-- #BeginEditable "title" -->
<title>MySite</title>
<!-- #EndEditable -->
<link rel="stylesheet" type="text/css" href="style.css" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<div id="wrapper">
<!--#include file="1.html" -->
<div id="tab">
<!--#include file="2.html" -->
<div id="center"><h1 class="all">Hello</h1>
<!-- #BeginEditable "body" -->
<div id="ch2">
<iframe class="one" marginwidth="1" marginheight="1" frameborder="0" src="http://www.differentsitedomain.com/index.cfm?fuseaction=showdetails&ln=<?php echo $_GET['xyz']; ?>&query=fuseaction=results&newsearch=yes" title="resultframe">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
</div>
<!-- #EndEditable -->
</div>
<!--#include file="4.html" -->
</div>
<!--#include file="5.html" -->
</div>
</body>
<!-- #EndTemplate -->
</html>