@EKKI
Hallo,
hier mein Code:
1. Seite
<?php
session_start();
include("connect.inc.php");
?>
<html>
<head>
<script language="Javascript">
function Cursorsetzen(){
document.forms[0].BED_NR.focus();
document.forms[0].BED_NR.select();
}
function testnr(xx){
if(xx.length>=6){
document.forms[0].submit();
}
}
</script>
<title>Anmeldung</title>
</head>
<body onLoad="Cursorsetzen();">
<?php if(!isset($_POST['BED_NR'])){?>
<form action="<?php $PHP_SELF ?>" method="post">
<table width="400" bgcolor="#000000" border="0" cellpadding="5" cellspacing="1" align="center">
<tr>
<td bgcolor="#e7e7e7" align="center" colspan="2">
<b>Anmeldung</b>
</td>
</tr>
<tr>
<td width="170" bgcolor="#e7e7e7">Pers.-NR:</td>
<td width="230" bgcolor="#ffffff">
<input type="password" name="BED_NR" size="6" class="input" <?php {echo ' value="'.$_POST['BED_NR'].'"';} ?>
onKeyup=testnr(this.value); />
</td>
</tr>
</table>
</form>
<?php
}elseif(!$_POST['BED_NR'] || $_POST['BED_NR'] == "") {
echo '<p align="center">Bitte geben Sie eine Pers.-NR ein!<br><br></p>';
echo '<meta http-equiv="refresh" content="3; url=BEDNR.php")>';
echo '<form action="index.php" method="post">';
echo '<input type="password" name="BED_NR" value="'.$_POST['BED_NR'].'">';
echo '</p>';
echo '</form>';
}else{
$select = "SELECT BED_NAME,BED_NR FROM T_BEDIENER WHERE BED_NR = '".$_POST['BED_NR']."'" ;
$dbh = interbase_connect();
$query = ibase_query($dbh,$select);
$row = ibase_fetch_object ($query);
$BED_NAME=$row->BED_NAME;
$BED_NR=$row->BED_NR;
$_SESSION["BED_NR"]=$BED_NR;
if($BED_NR == $_POST['BED_NR'] ){
$_SESSION["BED_NAME"] = $BED_NAME;
echo '<meta http-equiv="refresh" content="0; url=PPC.php")>';
}
else
{
echo '<p align="center">Diese Pers.-NR existiert nicht!<br><br></p>';
echo '<meta http-equiv="refresh" content="3; url=BEDNR.php")>';
}
}
?>
<center>
<table>
<tr>
<td>
<form action="MaterialEtikett.php" method="link">
<input type="submit" value="MaEtikett drucken">
</form>
</td>
</table>
</center>
</body>
</html>
2. Seite
<?php
include("connect.inc.php");
session_start();
if(!$_SESSION['BED_NAME'] || $_SESSION["BED_NAME"]== "") {
header("location:index.php");
die;
}
?>
<html>
<head>
<script language="Javascript">
function Cursorsetzen(){
document.forms[0].PPC.focus();
document.forms[0].PPC.select();
}
function testnr(xx){
if(xx.length>=6){
document.forms[0].submit();
}
}
</script>
<title>PPC-Nummer</title>
</head>
<body onLoad="Cursorsetzen();">
<?php if(!isset($_POST['PPC'])){?>
<form action="<?php $PHP_SELF ?>" method="post">
<table width="400" bgcolor="#000000" border="0" cellpadding="5" cellspacing="1" align="center">
<tr>
<td bgcolor="#e7e7e7" align="center" colspan="2">
<b>PPC-NR</b>
</td>
</tr>
<tr>
<td bgcolor="#e7e7e7" align="center" colspan="2">
<?php
echo '<p align="center"> Bedienername: '.$_SESSION["BED_NAME"].'';
?>
</td>
</tr>
<tr>
<td width="170" bgcolor="#e7e7e7">PPC-Nr:</td>
<td width="230" bgcolor="#ffffff">
<input type="text" name="PPC" size="20" class="input" <?php {echo ' value="'.$_POST['PPC'].'"';} ?>
onKeyup=testnr(this.value); />
</td>
</tr>
</table>
</form>
<center>
<table>
<tr>
<td>
<form action="logout.php" method="link">
<input type="submit" name="logout" value="Logout">
</form>
</td>
</table>
</center>
<?php
}elseif(!$_POST['PPC'] || $_POST['PPC'] == "") {
echo '<p align="center">Bitte geben Sie eine PPC-NR ein!<br><br></p>';
echo '<meta http-equiv="refresh" content="3; url=PPC.php")>';
echo '<form action="PPC.php" method="post">';
echo '<input type="text" name="PPC" value="'.$_POST['PPC'].'">';
echo '</p>';
echo '</form>';
}else{
$_SESSION["PPC"] = $_POST['PPC'];
echo '<meta http-equiv="refresh" content="0; url=Auftrag.php")>';
}
?>
</body>
</html>
vielleicht kannst du damit mehr anfangen.