Well thanks for that. I don't think it's forms that have been the problem. As far as I remember there's only one form on the site (it's a tiny site) which is a simple contact form. The problem was about the failure of links which should have called up pages containing images. The same pages and their images could be called either from a single "artworks" page, which had links to them all, or from other pages which had links just to specific groups of them. I've been assuming the globals and variables stuff has related to this issue of which pages are called from where - but maybe I'm completely wrong; as I've said, I've not yet sussed out how to read the code properly. I was going to post an example, but I can't find individual php files/pages that correspond to the links that didn't work, and I can't see the links on, say, the index page php file. But I'm relying on a very rudimentary knowledge of html and no knowledge at all of php. From looking at the index file, it appears that everything is somehow generated dynamically, so presumably that's where the variables come in. There's one file, "redirects.php" that may throw some light on it:
Code:
<?php /* alistapart.com/articles/succeed */
include("../php/xmlParser.php");
include("artwork.php");
// 1. check to see if a "real" file exists..
if(file_exists($DOCUMENT_ROOT.$REQUEST_URI)
and ($SCRIPT_FILENAME!=$DOCUMENT_ROOT.$REQUEST_URI)
and ($REQUEST_URI!="/")){
$url=$REQUEST_URI;
include($DOCUMENT_ROOT.$url);
exit();
}
// 2. if not, go ahead and check for dynamic content.
// Get URL and only use end file name
$expl = explode("/",$HTTP_SERVER_VARS["REQUEST_URI"]);
$UserRequest = $expl[ count($expl)-1 ];
// Check to see if such exists in xml, if not then 404 (if just '/' then also 404)
$artworks = artworksList("artworks.xml");
if( !in_array($UserRequest, $artworks) ) {// || ("" == $UserRequest)
header("HTTP/1.1 404 Not Found");
exit("404 Error");
} else if ("" == $UserRequest) {
header("HTTP/1.1 404 Not Found");
exit("404 Error - No index page");
}
// 3. Now create page
$artworkInfoArray = artworkInfo($UserRequest, 'artworks.xml');
artwork($artworkInfoArray, $UserRequest);
?>
Do you spot something here that would not work without register_globals on?
Bookmarks