On all pages apart from the contact page, I want it to show the following in the inc-header.php include.
<p><a href="contact.php">Contact</a></p>
On the page contact.php
, I want it to show:
<p><a href="index.php">Home</a></p>
This should be possible correct?
<?php
if (stripos($_SERVER['REQUEST_URI'], 'contact.php')){
echo '<p><a href="index.php">Home</a></p>';
}
else{
echo '<p><a href="contact.php">Contact</a></p>';
}
if ($_SERVER["SCRIPT_NAME"] == '/contact.php') {
echo '<p><a href="index.php">Home</a></p>';
} else {
echo '<p><a href="contact.php">Contact</a></p>';
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With