This is weird, this script does/doesn't work

From: Date: Tue, 03 Sep 2002 20:45:51 +0000
Subject: This is weird, this script does/doesn't work
Groups: php.general 
Request: Send a blank email to php-general+get-115081@lists.php.net to get a copy of this message
on my own machine, W2k+Apache+php4.2 this works without problem, on the Internet-server though, (Linux), the following script produces a blank page: <?php require "../utils.php"; $link=openDB(); $file = $target.form; // Queries for student if ($target == "student") { // Add student <Query to add> // Change student info <Query to change info> // Delete student <Query to delete> } // Queries for result if ($target == "result") { // Delete result <Query to delete> } if(!isset($administrate) && $goal) { if ($logga_in == "ok" ) { $adm_user = "admin"; $adm_pass = "password"; if ($operation == "logon") { if ($password == $adm_pass && $admin == $adm_user) { setcookie("administrate", "OK", 0); include("../recycle/head.php"); include ("$file.php"); } else { include("../recycle/head.php"); echo "<CENTER><FONT SIZE=\"5\" COLOR=\"#C90000\">Please try again. Check your spelling.</FONT><CENTER>"; include ("loginform.php"); } } } else { include("../recycle/head.php"); include ("loginform.php"); } } elseif ($target) {//When logged in this load the right form include("../recycle/head.php"); include ("$file.php"); } if (!$target) {//This happens when first loaded. In the head.php there's a menu and the different targets are set include("../recycle/head.php"); echo " <H2>Administration of <SUB><IMG BORDER=0 SRC=\"../pics/mypicmin.gif\" WIDTH=135 HEIGHT=30></SUB></H2> "; } include("../recycle/bottom.php"); ?> Explanation: utils.php with the two functions openDB() and queryDB() connect to the database and do the query. loginform.php contains the html to the loginform. $file = $target.form; so the right form will be loaded. So, what is wrong, why does it 'behave' so different?

« previous php.general (#115081) next »