Hi!
Take a look at your quotes, most likely the problem lies there. You should find a method that suits you, then stick to it. My suggestion would be to use "string" for strings and 'var' for values inside the brackets. A good point would also be to define the 'goto' at start of script.
Here's a rewrite:
## Define the var $goto and $style/$template ##
$goto = $_GET['goto'];
$style = $_GET['style'];
$tmplte = $_GET['template'];
## Start the check ##
if(!$goto) {
header("Location: [url]http://www.cybercantina.net/index.p...le=x&template=x[/url]");
}else{
$what_body = "main.php";
$what_template = "default_html.php";
$what_style = "cantinaGlobal.css";
if($goto == "main" || $goto == "x") {
$what_body = "main.php";
}else{
$what_body = $goto;
$what_body .= ".php";
}
## You may want to look closer at the if-elses below - they're strange ##
if(!$style || $style =="x" ) {
$what_style = "cantinaGloabl.css";
}else{
$what_style = $style;
$what_style .= ".php";
}
if(!$tmplte || $tmplte == "x") {
$what_template = "default_html.php";
}else{
$what_template = $tmplte ;
$what_template .= ".php";
}
}
This is OK, and will check wether the goto is main OR x - both will return true in this case:
if($goto == "main" || $goto == "x") {
but this is strange:
if(!$style || $style =="x" ) {
What it does is first to ask wether the $style is set (and if it is - return false), then ask for a condition for $style.
Just do the last, I think:
if($style =="x" ) {
knutm