Hi,
I have a webpage that displays different info at different times of day,
it worked fine until i put flash on my page,
i used tutorial on how to remove "click to activate" in updated IE.
here: http://www.gerozahn.de/click-workaround/

then I tried to use my code to display different info according to time,
i used this code, which works fine without "click to activate" fix:

<?php
$hour = date('G'); //This outputs the current hour in 0 - 23 (24 hour format)
if($hour >= 21 || $hour <= 0)
{
?>
........................my webpage..............................
}
else
{
?>
........................another webpage.......................

then I tried to use "click to activate" fix with the above code like this:

<?php
  ob_start();
?>
<?php
$hour = date('G'); //This outputs the current hour in 0 - 23 (24 hour format)
if($hour >= 21 || $hour <= 0)
{
?>
........................webpage with flash..............................
}
else
{
?>
........................another webpage with flash.......................
<?php
  include_once "replaceObjEmbed.php";
  echo replaceObjEmbed(ob_get_clean());
?>     [B]<------ parse error here, unexpected $[/B]

i even tried to switch them around but still i get the parse error,
"click to activate" fix works fine on a single page though
please help!
thank you

Recommended Answers

All 3 Replies

<?php
  ob_start();
?>
<?php
$hour = date('G'); //This outputs the current hour in 0 - 23 (24 hour format)
if($hour >= 21 || $hour <= 0)
{
?>
........................webpage with flash..............................
[b]<?php <--- You're missing this[/b]
}
else
{
?>
........................another webpage with flash.......................
<?php
  include_once "replaceObjEmbed.php";
  echo replaceObjEmbed(ob_get_clean());
?>

hi!
thanks for the reply,
i've tried your suggestion but it still gives parse error
here is the file, if you could kindly please check out,
thanks
http://dalerlife.net/file.zip

Maybe your problem is not with that script but with replaceObjEmbed.php. Try checking it, maybe that's where the problem is.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.