kinger251285 Posted November 7, 2008 Share Posted November 7, 2008 Hi all I am new here so if i do anything wrong please bare with me. Right i am developing a shopping site for my dad. I have a login section which then takes you to a admin section where items stocked can be edited as well as categories. I am having a problem with my hrefs in this section. I want to click on them and be taken to the relevant section and then the ability to click on any other one to go to that section. At current i can click on one href and it goes to tat section as supposed to however when i click any other one it does not. The code is as follows: <?php if (!defined('WEB_ROOT')) { exit; } $self = WEB_ROOT.'admin/index.php'; ?> <html> <head> <title><?php echo $pageTitle; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="<?php echo ?>admin/include/admin.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/javascript" src="<?php echo WEB_ROOT;?>library/common.js"></script> <?php $n = count($script); for ($i = 0; $i < $n; $i++) { if ($script[$i] != '') { echo '<script language="JavaScript" type="text/javascript" src="' . WEB_ROOT. 'admin/library/' . $script[$i]. '"></script>'; } } ?> </head> <body> <table width="750" border="0" align="center" cellpadding="0" cellspacing="1" class="graybox"> <tr> <td colspan="2"><img src="<?php echo ?>admin/include/banner-top.gif" width="750" height="75"></td> </tr> <tr> <td width="150" valign="top" class="navArea"><p> </p> <p><a href="index.php" class="leftnav">Home</a></p> <p> <a href="category/index.php" class="leftnav">Category</a> </p> <p><a href="product/index.php" class="leftnav">Product</a> </p> <p><a href="order/?status=Paid" class="leftnav">Order</a></p> <p> <a href="config/" class="leftnav">Shop Config</a></p> <p><a href="user/" class="leftnav">User</a> <a href="<?php echo $self; ?>?logout" class="leftnav">Logout</a> </p> <p> </p> <p> </p> <p> </p> <p> </p></td> <td width="600" valign="top" class="contentArea"><table width="100%" border="0" cellspacing="0" cellpadding="20"> <tr> <td> <?php require_once $content; ?> </td> </tr> </table></td> </tr> </table> <p> </p> <p align="center">Copyright © 2005 - <?php echo date('Y'); ?> <a href="http://www.missinglegobrick.com"> www.missinglegobrick.com</a></p> </body> </html> The problem i have is that when i click any other href after clicking the first one it tries finding the file in the previous href's directory folder. example: /category/index.php /category/order/?status=Paid where as if i click the status paid one first it comes out /order/?status=Paid /order/category/index.php I can see that i could get this to work by having all the php pages in the same folder but there must be a way to reset the href then go to the correct one or something. Any help appreciated. Matt Link to comment https://forums.phpfreaks.com/topic/131775-solved-multiple-href-problem-with-directories/ Share on other sites More sharing options...
kinger251285 Posted November 7, 2008 Author Share Posted November 7, 2008 Hi All I have sorted this by setting up absolute url links to my specific pages durgh it always seems obvious after, thanks for looking all. Link to comment https://forums.phpfreaks.com/topic/131775-solved-multiple-href-problem-with-directories/#findComment-684587 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.