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?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php