
December 7th, 2004
08:02 PM

YARRGG... Can any one tell me why....
Interesting problems, I may have the answer but would like feed back.
Can anyone tell me, when visiting: http://www.jaceweb.com/
Do you get the same page with clicking on a link, but the
index.php?page=XX changes?
It works fine here..
http://www.hosehead78.com/dev/jaceweb/
Which was the beta for the site. Everything was transfered correctly the pages are there that need to be. All php script is correct and up to date for being located on the www.jaceweb.com server.
Now, My thoughts on why this is happening is that what is on my website http://www.hosehead78.com/dev/jaceweb/ is an updated php version and whats on http://www.jaceweb.com/ is a slightly older version.
Could it be possible that the other version doesnt have the array capablitities??
http://www.jaceweb.com/ - php version 4.0.6 (wow old version)
mine - 4.3.5
<I do very well think that it is the version...>
___________________
I can't Breathe when I hold My Breathe.

December 7th, 2004
08:28 PM
Neversidian
Status: Offline!
can we see the query string code used in JACEWEB.com?
___________________
STphp - Modern Web Solutions - CLOSED
ShaunTobias.co.uk - Blog and Portfolio - CLOSED
Look out for LookCreative.co.uk in September.

December 7th, 2004
08:39 PM

Sure cann
Here ya are...
<?
$p = $_GET['page'];
// Check for Main Sections
if (($p == "1")||($p == "")||($p >= "9")) // If 1 returns to
//the home page, If blank or 9 of higher returns to home page
{
$page = 'main.php';
}
if ($p == "2")
{
$page = 'bios.php';
}
if ($p == "3")
{
$page = 'events.php';
}
if ($p == "4")
{
$page = 'program.php';
}
if ($p == "5")
{
$page = 'guest.php';
}
if ($p == "6")
{
$page = 'concerts.php';
}
if ($p == "7")
{
$page = 'links.php';
}
if ($p == "8")
{
$page = 'messageboard.php';
}
// End Check for Main Sections
// Check for BIO's Section
if (($p == "jace")||($p == "Jace"))
{
$page = 'jace.php';
}
if (($p == "goat")||($p == "Goat"))
{
$page = 'goat.php';
}
if (($p == "stinky")||($p == "stinky"))
{
$page = 'stinky.php';
}
if (($p == "phantom")||($p == "Phantom"))
{
$page = 'phantom.php';
}
if (($p == "spaz")||($p == "Spaz"))
{
$page = 'spaz.php';
}
if (($p == "john")||($p == "john"))
{
$page = 'john.php';
}
// End Bio's Section Check
// Check for Events Section
if (($p == "fest")||($p == "Fest"))
{
$page = 'testfest.php';
}
// End Events Section Check
// Start Guests Check
if (($p == "rj")||($p == "RJ"))
{
$page = 'guests/RonJeremy.htm';
}
// End Guests Check
// File Exist Check
if(file_exists($page))
{
// Nothing here
}
else
{
$page = 'error.php';
}
// End File Exist Check
?>
Thanks...
___________________
I can't Breathe when I hold My Breathe.

December 7th, 2004
08:41 PM
Neversidian
Status: Offline!
*EDIT*
where it says:
//nothing here
you should put:
include($page);
___________________
STphp - Modern Web Solutions - CLOSED
ShaunTobias.co.uk - Blog and Portfolio - CLOSED
Look out for LookCreative.co.uk in September.

December 7th, 2004
08:44 PM
Hehe Sorry, the page is included later in the php file.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>J A C E W E B . C O M : : : W E B S I T E DEV I</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#000000" text="#FFFFFF" leftmargin="0" topmargin="0">
<div align="center"><? include 'top.php'; // Header & Menu page ?></div>
<div align="center">
<?
include $page; // Main Section of page
?>
</div>
<div align="center"><? include 'footer.php'; // Footer?></div>
</body>
</html>
There ya go the rest... of the file.. SOrry about that...
___________________
I can't Breathe when I hold My Breathe.

December 7th, 2004
09:04 PM
Neversidian
Status: Offline!
erm... have you tried changing
$_GET['page'];
to
$HTTP_GET_VARS[page];
also, I would use
elseif instead of all of those if statements
___________________
STphp - Modern Web Solutions - CLOSED
ShaunTobias.co.uk - Blog and Portfolio - CLOSED
Look out for LookCreative.co.uk in September.

December 8th, 2004
12:55 AM
Nope.. Didn't work.
IM pretty sure that it has to do with the version of php that is on the server.
___________________
I can't Breathe when I hold My Breathe.

December 8th, 2004
01:14 AM
Neversidian
Status: Offline!
if it has to do with the version, it will be the $_GET['page'] thing
using query strings like this would be ALOT easier using switch statements.
also, did you try cganging to elseif?
___________________
STphp - Modern Web Solutions - CLOSED
ShaunTobias.co.uk - Blog and Portfolio - CLOSED
Look out for LookCreative.co.uk in September.

December 8th, 2004
01:36 AM
Neverside Newbie
Status: Offline!
You don't REALLY need the $_GET['var'] thing in most versions of PHP.
If I were you, i'd just give using the variable as is a go.
Ie, just use $page throughout the program. If that works, then you at least know that it's a problem with $_GET. If it doesn't work, it's a problem elsewhere.

December 8th, 2004
03:11 AM
you should really change to switch case.