PHP
Redirect navbar links to another page via php
Login To Post Your Comment
1 comments
Manfred Lim
4 years agoHello Colleen, if redirecting in a PHP code above tag, <?php header("location: ContactUs.php"); ?>. If redirecting in HTML code, like your above code:
<li><a href="ContactUs.php">Contact Us</a></li> To play safe, you can make use of the defined site url, to create a constant for SITE_URL and add it to the href: <li><a href="<?php echo SITE_URL; ?>ContactUs.php">Contact Us</a></li>