Hallo zusammen,
momentan habe ich das Problem, das einige Variablen leer sind. obwohl sie vorher im Formular einen Inhalt hatten.
formular.html
	
register_save.php
	
Ausgabe vom Seitenquelltext:
	Hat jemand ne Ahnun warum dies so ist?
							
						
					momentan habe ich das Problem, das einige Variablen leer sind. obwohl sie vorher im Formular einen Inhalt hatten.
formular.html
PHP-Code:
	
	
form action="register_save.php" method="post">
<div id="table_head"><br><b>Registrierung - Accountinformation</b></div>
<div id="table_content"><br><table width="80%">
    <tr>
        <td>Benutzername</td>
        <td><input class="<?php echo $errorClass['user']; ?>" value="<?php echo $_POST['user']; ?>" type=text name=user></td>
    </tr>
    <tr>
        <td>E-Mail</td>
        <td><input class="<?php echo $errorClass['mail']; ?>" value="<?php echo $_POST['mail']; ?>" type=text name=mail></td>
    </tr>
    <tr>
        <td>E-Mail (Wdh)</td>
        <td><input class="<?php echo $errorClass['mail1']; ?>" value="<?php echo $_POST['mail1']; ?>" type=text name=mail1></td>
    </tr>
    <tr>
        <td>Passwort</td>
        <td><input class="<?php echo $errorClass['passwd']; ?>" value="<?php echo $_POST['passwd']; ?>" type=password name=passwd></td>
    </tr>
    <tr>
        <td>Passwort (Wdh)</td>
        <td><input class="<?php echo $errorClass['passwd1']; ?>" value="<?php echo $_POST['passwd1']; ?>" type=password name=passwd1></td>
    </tr>
</table></div>
<div id="table_footer"></div>
PHP-Code:
	
	
<?php
print_r($_POST);
$errorFields = array('user',
                     'mail',
                     'mail1',
                     'passwd',
                     'passwd1');
$error = FALSE;                     
foreach($errorFields as $key => $value) {
    if(empty($_POST[$errorFields[$key]])) {
        $error = TRUE;
        $errorClass[$value] = 'errorField';
        $errorMessage = 'ist leer';
    }
}
if($error == TRUE) {
    include("html/regerror.html");
    include("html/registrieren.html");
} else {
    if(md5(strtoupper($_POST['captcha'])) == $_SESSION['captcha']) {
    
    if(!empty($_POST['user']) && !empty($_POST['mail']) && !empty($_POST['mail1']) && !empty($_POST['passwd']) && !empty($_POST['passwd1'])) {
    
        if($_POST['passwd'] == $_POST['passwd1'] || $_POST['mail'] == $_POST['mail1']) {
Code:
	
	Array ( [user] => [mail] => muh [mail1] => muh [passwd] => [passwd1] => dsfsdf [captcha] => )
 
          
 Moderatorin
 Moderatorin

Kommentar