$selects = "id,passwd";
$db = "from $db";
$rule = "where id=$id";
$cpassword=mysql_result(mysql_query("select password('$password')"),0,
"password('$password')");
# @mysql...: suppresses warnings:
@mysql_connect("localhost","wwwuser","$dbpassword")
or die("Connection died or wrong database password!");
mysql_select_db("e136") ;
$result = mysql_query("select $selects $db $rule");
$supervisor = mysql_query("select password FROM passwd");
if (!mysql_num_rows($result)):
$pagetitle = "Entry not found!";
$pageheadline = $pagetitle;
include "../e136header.phtml"?>
Sorry, but I couldn't find any entry with this id.
Please contact the system-adminstrator!
include "../e136footer.phtml";
exit;
endif;
if ($cpassword != mysql_result($result,0,"passwd") &&
$cpassword != mysql_result($supervisor,0,"password")):
$pagetitle = "Wrong Password";
$pageheadline = "Sorry, wrong password";
include "../e136header.phtml"?>
The password you gave does not match
the one in the database.
Perhaps you made a typo. Then push the
back button in your browser and try again!
include "../e136footer.phtml";
exit;
endif;
$pagetitle = "EDIT/CHANGE/DELETE Entry of the Database";
$pageheadline = $pagetitle;
include "../e136header.phtml";
$action="unknown"?>
Database: echo $db?>
Entry Id: echo $id?>
if ($db=="from stammgast"): ?>
include "../e136footer.phtml"?>
exit?>