Php scripts
Posted: 06. May 2009 20:27
I've installed xampp to work on Wordpress themes. It works great for that. I have an issue, however, with a site written in html/mysql/php. I moved the entire site to a folder inside htdocs. The navigation is done using php if statements. They don't work and I'm baffled as to why. Any thoughts?
This works fine:
I'm seeing the menu images. I can navigate away from the homepage only by going to the Library, which is a separate page.
This doesn't work.
Only the If (!isset) occurs which tells me variables aren't being passed. What have I got set wrong?
ElfN
This works fine:
- Code: Select all
if ($inc == 1) {
echo "<IMG SRC=\"images/Library_f2.gif\" WIDTH=\"175\" HEIGHT=\"25\" BORDER=0 ALT=\"Articles on longlining, driving and movement\"><BR>";
} else {
echo "<a href=\"Library.php\"><IMG SRC=\"images/Library.gif\" WIDTH=\"175\" HEIGHT=\"25\" BORDER=0></a><BR>";
}
I'm seeing the menu images. I can navigate away from the homepage only by going to the Library, which is a separate page.
This doesn't work.
- Code: Select all
if (!$inc) {
include "Home.html";
} elseif ($inc == 2) {
include "Axwood.html";
} elseif ($inc == 3) {
include "ForSale.html";
} elseif ($inc == 4) {
include "Info.html";
} elseif ($inc == 5) {
include "Links.php";
} elseif ($inc == 8) {
include "Winter2004.html";
} elseif ($inc == 9) {
include "XMas2004.html";
}
Only the If (!isset) occurs which tells me variables aren't being passed. What have I got set wrong?
ElfN