| | |
Keeping a Image only on the index page
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Apr 2008
Posts: 45
Reputation:
Solved Threads: 0
Hi everyone, I am new to PHP and I am not understanding some of it functions and rules on how to do things. I have a few questions but I will work on one at time so that I can understand and absorb the information giving to me.
The problem that I have been having the past two days is that my flash is showing up on all my pages because I have told all my page to go to my index page which is below, because it has my navigation, header, footer, and so on.
I have tried to place my flash on a different php page but include my flash.inc.php page to the index and ofcourse I still have the same problem it shows up on all my othe pages. Is there a way to get around the problem that I am having and just maintain the flash on only the index page; but not have it on my other page that the index page are connected to.
Thanks in advance
The problem that I have been having the past two days is that my flash is showing up on all my pages because I have told all my page to go to my index page which is below, because it has my navigation, header, footer, and so on.
I have tried to place my flash on a different php page but include my flash.inc.php page to the index and ofcourse I still have the same problem it shows up on all my othe pages. Is there a way to get around the problem that I am having and just maintain the flash on only the index page; but not have it on my other page that the index page are connected to.
Thanks in advance
PHP Syntax (Toggle Plain Text)
<script language="javascript">AC_FL_RunContent = 0;</script> <script src="AC_RunActiveContent.js" language="javascript"></script> <link href="frontpage.css" rel="stylesheet" type="text/css" /> <?php include("mylibrary/login.php"); include("mylibrary/showproducts.php"); login(); ?><body> <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td id="header" height="90" colspan="3"> <?php include("header.inc.php"); ?></td> </tr> <tr> <td id="nav" width="15%" valign="top"> <?php include("nav.inc.php"); ?></td> <td id="main" width="50%" valign="top"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','500','height','300','src','admin/images/hair','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','admin/images/hair' ); //end AC code </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="500" height="300"> <param name="movie" value="admin/images/hair.swf" /> <param name="quality" value="high" /> <embed src="admin/images/hair.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="500" height="300"></embed> </object></noscript> <?php if (!isset($_REQUEST['content'])) include("main.inc.php"); else { $content = $_REQUEST['content']; $nextpage = $content . ".inc.php"; include($nextpage); } ?></td> <td id="status" width="15%" valign="top"> <?php include("cart.inc.php"); ?></td> </tr> <tr> <td id="footer" colspan="3"> <div align="center"> <?php include("footer.inc.php"); ?> </div></td> </tr> </table> </body> </html>
•
•
Join Date: Nov 2007
Posts: 81
Reputation:
Solved Threads: 2
Hi
If you are including a block of code into each page, but you only want it to show on one page, a simple fix would be to retrieve the url, explode it and find the last chunk - if it is 'index.php', then show the flash block, otherwise do not show it.
If you are including a block of code into each page, but you only want it to show on one page, a simple fix would be to retrieve the url, explode it and find the last chunk - if it is 'index.php', then show the flash block, otherwise do not show it.
PHP Syntax (Toggle Plain Text)
<?php $url = $_SERVER['REQUEST_URI']; $pieces = explode('/', $url); $page = $pieces[sizeof($pieces) - 1]; if($page == 'index.php') { //FLASH CODE HERE } ?>
•
•
•
•
Hi
If you are including a block of code into each page, but you only want it to show on one page, a simple fix would be to retrieve the url, explode it and find the last chunk - if it is 'index.php', then show the flash block, otherwise do not show it.
PHP Syntax (Toggle Plain Text)
<?php $url = $_SERVER['REQUEST_URI']; $pieces = explode('/', $url); $page = $pieces[sizeof($pieces) - 1]; if($page == 'index.php') { //FLASH CODE HERE } ?>
php Syntax (Toggle Plain Text)
if (basename($_SERVER['PHP_SELF']) == 'index.php') { //FLASH CODE HERE }
Last edited by cwarn23; Apr 3rd, 2009 at 9:59 am.
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
![]() |
Similar Threads
- SpeedUp Your Window XP Never Than Before (Windows tips 'n' tweaks)
- How to configure GD (PHP)
- The most famous CSS web sites galleries in the world (HTML and CSS)
- Help with automatic update problem and more (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: PHP image doesnot work in GIF
- Next Thread: help: Very Simple Image Display!
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube






