This is above the <html> tag
<?php
$chanels = "";
foreach($_POST as $key => $value) {
if($value == "on") {
if($chanels == "") {
$chanels .= $key;
} else {
$chanels .= ", ".$key;
}
}
}
$channels = setcookie("channels","$chanels",time()+60*60*24*45,"/",".toshhatch.com",0);
$chanels_array = explode(",", $chanels);
?>
This is the text under the <body> tag on file my_index.php
<?php
$row_repeat = 1;
$how_many_colums = 3;
echo "<TABLE>";
while($this_channel = array_pop($chanels_array))
{
if($row_repeat == 1)
{
echo "<TR>";
}
echo "<TD>";
echo include channels/($this_channel).php; // this is the line that I need help with
echo "</TD>";
if($row_repeat == $how_many_colums)
{
echo "</TR>";
$row_repeat = 1;
}
else
{
$row_repeat++;
}
}
if($row_repeat != 1)
{
echo "</TR>";
}
echo "</TABLE>";
?>
echo "<TD>";
echo include channels/($this_channel).php; // this is the line that I need help with
echo "</TD>";
For the above line I have a folder named channels that have 38 different channels (small tables). $this_channel with holds a value from the previous page in a checkbox like so.
<input name="weather" type="checkbox"> Weather
The file I want to show up in the table cell is here.
channels/weather.php
channels/sports.php
for example, etc, etc. For each choosen checkbox.
http://www.toshhatch.com/networld/my_index.php
That the location if you want to try it.
Any ideas? :bemused: