I have cobbled together a switch.php that will serve up three different landers, rotating through each one in increments:
[high=php]
<?php
//get the current value in the file
$counthandle=fopen("count.txt","r");
$getcurrent=fread($counthandle,filesize("count.txt"));
switch($getcurrent){
case "1":header( 'Location:/1.php' );$getcurrent = "2";break;
case "2":header( 'Location:/2.php' );$getcurrent = "3";break;
case "3":header( 'Location:/3.php' );$getcurrent = "1";break;
}
//update the file
fclose($counthandle);
$counthandle1=fopen("count.txt","w");
fputs($counthandle1,$getcurrent);
fclose($counthandle1);
?>[/high]
But at the top of each of these pages I have this, which no longer works (for obvious reasons, I guess):
[high=html]
<?php
require("header.php");
$searchedterm = "";
if (isset($_REQUEST["key"])) {
$searchedterm = $_REQUEST["key"];
}
?> <div id="main_content_text">
<span id="main_content_title">Get <span id="focus"><?php print(ucfirst(strtolower($searchedterm))); ?></span> Your Widgets Today!</span><br>
[/high]
Is there a way that I can pass $searchedterm through the rotator.php to each of the landers?
I thank you in advance.
Fearsome.
[high=php]
<?php
//get the current value in the file
$counthandle=fopen("count.txt","r");
$getcurrent=fread($counthandle,filesize("count.txt"));
switch($getcurrent){
case "1":header( 'Location:/1.php' );$getcurrent = "2";break;
case "2":header( 'Location:/2.php' );$getcurrent = "3";break;
case "3":header( 'Location:/3.php' );$getcurrent = "1";break;
}
//update the file
fclose($counthandle);
$counthandle1=fopen("count.txt","w");
fputs($counthandle1,$getcurrent);
fclose($counthandle1);
?>[/high]
But at the top of each of these pages I have this, which no longer works (for obvious reasons, I guess):
[high=html]
<?php
require("header.php");
$searchedterm = "";
if (isset($_REQUEST["key"])) {
$searchedterm = $_REQUEST["key"];
}
?> <div id="main_content_text">
<span id="main_content_title">Get <span id="focus"><?php print(ucfirst(strtolower($searchedterm))); ?></span> Your Widgets Today!</span><br>
[/high]
Is there a way that I can pass $searchedterm through the rotator.php to each of the landers?
I thank you in advance.
Fearsome.