Mucker
-
Posts
4 -
Joined
-
Last visited
Posts posted by Mucker
-
-
I can't edit my post so i am bumping it to explain what i need. Basically ginerjm from the second block of code. Thats from another php script, but i need to exclude that php script becuase I don't want it visible on the page i am working on, but I need it visible on other pages.
-
Have no idea what you are trying to do, but try this.
<?php
if (strpos($_SERVER['REQUEST_URI'], 'upload.php') == false)
{
echo 'the stuff below is removed, or if the URL is something else, its not removed'
}
else
{
echo '<div class="navbar" name"navbar" Id="navbar">';
echo '<div class="navbar-inner" name="navbar-inner" Id="navbar-inner">';
echo a_view('core/account/login_dropdown');
echo a_view_menu('topbar', array('sort_by' => 'priority', array('menu-hz') ) );
echo a_view('search/search_box', array('class' => 'search-header'));
echo '</div> </div>';
}
This would prevent the second part from being output.
Note - there is at least one error in that code, so I don't think it's working as shown. Also your first if statement is backwards if you want the "else" stuff dropped if the uri is upload.php
Can you define how it's backwards? I am working on a website with a friend, and we are just stuck on this bit. If you could fix the code, I would be most greatful
-
The first block of code is what i want to use since i know it works, but i dont know how to use it with the code already there.
<?php if (strpos($_SERVER['REQUEST_URI'], 'upload.php') == false) { echo 'the stuff below is removed, or if the URL is something else, its not removed' ?>
This code is already in my form and can not be changed!!! This is what I want to remove totally if the URL is upload.php
<div class="navbar" name"navbar" Id="navbar"> <div class="navbar-inner" name="navbar-inner" Id="navbar-inner">' <?php echo a_view('core/account/login_dropdown'); ?> <?php echo a_view_menu('topbar', array('sort_by' => 'priority', array('menu-hz'))); ?> <?php echo a_view('search/search_box', array('class' => 'search-header')); ?> </div> </div>
Can anyone help?
If URL then script
in PHP Coding Help
Posted
thank you very much friend