I am having trouble with the following script:
After setting my $pageurl variable it loses its value for the first time I try to call it and then it regains its value the second time I call it.
In the beginning IF structure I set the variable $pageurl to the page variable in my querystring. This works fine, but later in the script when I set the $activepage variable to be equal to $pageurl the $activepage variable has a value of "" but still later when I set the $pagename variable to "/" . $companyurl . "/" . $pageurl it works and the value of $pagename becomes "/test/test.htm/".
<?php
if(isset($_GET["company"])){
$companyurl=$_GET["company"];
if(isset($_GET["page"])){
$pageurl=trim((string)$_GET["page"]);
}
}
//choose theme since we have not connect to the database yet to find out
$theme="black";
$logoOrWordmark="logo";
$pagenames = array("Home", "Products / Services", "Portfolio / Testimonials", "Photo Gallery", "About Us", "Contact Us");
$activepage= $pageurl; // <--here $pageurl seems to equal to ""
$rss="";
$guarantee = "wow";
$pagename= "/". $companyurl . "/" . $pageurl; // <--here $pageurl seems to have remembered the value I gave it.