Jump to content

Redirecting without concatenating


mannyee

Recommended Posts

hey guys!!

 

I am trying to redirect a page to other pages by using anchors <a> in html as follows:

<

  Quote

      <a href="<?php echo WEB_ROOT; ?>admin/" class="leftnav">Home</a>

      <a href="<?php echo WEB_ROOT; ?>admin/category/" class="leftnav">Category</a>

      <a href="<?php echo $self; ?>?logout" class="leftnav">Logout</a>

 

and the page in which this code resides is http://127.0.0.1/project8/admin/index.php

 

But when i click the Home link in the page the page redirects to

  Quote

 

where I need only http://127.0.0.1/project8/admin/.

 

The same is the case for Category

Instead of redirecting to http://127.0.0.1/project8/admin/category, the page redirects to

  Quote

 

and here WEB_ROOT is calculated to project8

 

What should i do now?

 

Thanks in advance!!

Link to comment
https://forums.phpfreaks.com/topic/195839-redirecting-without-concatenating/
Share on other sites

Try removing the WEB_ROOT from your links.

  Quote

 

But if i did that i would be able to move , say to categories folder, but i would have to go back to the Home to go to the Product(which i omitted in the code for brevity). I want to visit the category pages and without moving back to the index page(home) i wud want to move to the products page by directly clicking the products link

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.