4
Contributors
12
Replies
13
Views
6 Years
Discussion Span
Last Post by almostbob
0

yea i tried full url as well and / that doesnt work as well

Edited by rusty813: n/a

0

the only pages outside from the admin folder is newsletter.php, header, and footer.php

pages that are in the admin folder are index.php, login.php, and add.user.php

0

SO you're saying that:

echo "<a href=\"/newsletter.php\">Newsletter </a>\n";
 echo "<a href=\"/admin/add.user.php\">Add Admin </a>\n";
 echo "<a href=\"/admin/logout.php\">Logut </a><br>\n";
} else {
 echo "<a href=\"/newsletter.php\">Newsletter </a>\n ";
 echo "<a href=\"/admin/login.php\">Login </a>\n";

AND

echo "<a href=\"http://www.#.com/newsletter.php\">Newsletter </a>\n";
 echo "<a href=\"http://www.#.com/admin/add.user.php\">Add Admin </a>\n";
 echo "<a href=\"http://www.#.com/admin/logout.php\">Logut </a><br>\n";
} else {
 echo "<a href=\"http://www.#.com/newsletter.php\">Newsletter </a>\n ";
 echo "<a href=\"http://www.#.com/admin/login.php\">Login </a>\n";

Don't work?

0

yes that is correct and i have even tried almostbob way as well

0

thats definitely not going to work cause its a website address, i am using a local server

0

definitely www.#.com was just for example.

$siteurl = "http://localhost/xampp/website/";

if ($session_name) {
echo '<a href="'.$siteurl.'/newsletter.php">Newsletter </a>\n';
 echo '<a href="'.$siteurl.'/admin/add.user.php">Add Admin </a>\n';
 echo '<a href="'.$siteurl.'/admin/logout.php">Logut </a><br>\n';
} else {
 echo '<a href="'.$siteurl.'/newsletter.php">Newsletter </a>\n ';
 echo '<a href="'.$siteurl.'/admin/login.php">Login </a>\n';

Try above code.
and whenever you upload files to live don't forget to change $siteurl.

Edited by vibhaJ: n/a

0

Have you set up a virtual host in C:\xampp\apache\conf\extra\httpd-vhosts.conf and C:\Windows\System32\drivers\etc\hosts ?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.