PDA

View Full Version : Script help


Serge
08-18-2002, 11:07 PM
I'm trying to run the following script to change in and out the content of my pages:


<?php

switch($nav)
{
case "about":
include ('about.txt');
break;

case "forums":
include ('forums.txt');
break;

case "contact":
include ('contact.html');
break;

case "staff":
include ('staff.txt');
break;

case "links":
include ('links.txt');
break;

case "downloads":
include ('downloads.txt');
break;

case "projects":
include ('projects.txt');
break;

default:
include ('news.txt');
}

?>


Just some fyi before I talk about my problem news.txt is part of a cgi script to right news it is updated though a cgi script. Ok well when I click forums. about, and contact it just continues to go back to news.txt you can see what I mean by going to www.surrix.net and clicking the three. Now I have the contact.html page uploaded to the webserver the rest I don't have but I can't get why it won't take me to the contact.html page. Can anyone help

Thanks,
Serge

mr e
08-18-2002, 11:12 PM
well for the about page, your url is index.php?page=about, not index.php?nav=about

same problem with your contact link, and forums link

Serge
08-18-2002, 11:14 PM
:dead: Damn I have spent the last couple of hours working on that and it was only that damn.

mr e
08-18-2002, 11:35 PM
lol, dont feel bad, i do that too

g-force2k2
08-19-2002, 12:31 AM
yeah we all do that kinda of stuff ;\

its the smallest things that keep me up all night then i find my mistake and i just want to flip :)

g-force2k2

Ajay
08-19-2002, 12:32 AM
http://www.surrix.net/index.php?var=about works. http://www.surrix.net/index.php?page=about gives an error