• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

END OF FILE ERROR

starbrood88

Neues Mitglied
Tag zusammenich hab n Problem dass mich schon seit tagen ärgert. ich hab ein php file dass mir immer weider den fehler "Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\medoIf\client_infoForm.html on line 348 " ausgibt. Ich hab das file nun zig mal auf fehlende klammern gescannt und nix gefunden. Bitte helft mir ich verzweifle hier langsam aber sicher ...
NOTE: ich bin recht neu in php bitte enschuldigt falls das ganze nich so toll geschriben ist^^

PHP:
<link href="Style\style.css" rel="stylesheet" type= "text/css">
<h1 class="StilCaption">KUNDENDATEN</h1>
<?php
    $action ="client.php?COM=";
    if(!empty($nKNr)) {$action .= "up'";}
    else $action .= "new'";
?>
<form id="client" name="client"  method="post" action='<?php echo $action;?>'>
    <?php if (!$nKNr || $_SESSION['userType'] == 1 || ($_SESSION['userType'] == 2 && $bLight))
    { ?>
    <table width="608" border="1">
        <tr>
            <td width="141"><strong>Kundennummer:</strong></td>
            <td><?php
                if($nKNr) {echo $nKNr;?> <input name="KNR" type="hidden" id="KNR" maxlength="6" size="10" value="<?php echo $nKNr;?>" disabled="disabled"/>}
                else {<input name="KNR" type= "hidden" id="KNR" maxlength="6" size="10" value="<?php echo $nKNr;?>"/>}
                ?>
            </td>
        </tr>
        <tr>
            <td><strong>Titel:</strong></td>
            <td><?php
                    if($nKNr) {?><input name="TITEL" type="text" id="TITEL" maxlength="20" size="20" value="<?php echo $sTitel;?>" disabled="disabled"/>}
                    else {<input name="TITEL" type="text" id="TITEL" maxlength="20" size="20" value="<?php echo $sTitel;?>" />}
                ?>
            </td>
        </tr>
        <tr>
            <td><strong>Vorname:</strong></td>
            <td><?php
                    if($nKNr) {?><input name="VNAME" type="text" id="VNAME" maxlength="50" size="50" value="<?php echo $sVName;?>" disabled="disabled"/>}
                    else {<input name="VNAME" type="text" id="VNAME" maxlength="50" size="50" value="<?php echo $sVName;?>"/>}
                ?>
            </td>
        </tr>
        <tr>
            <td><strong>Nachname:</strong></td>
            <td><?php
                    if($nKNr) {?><input name="NNAME" type="text" id="NNAME" maxlength="70" size="70" value="<?php echo $sNName;?>" disabled="disabled">}
                    else {<input name="NNAME" type="text" id="NNAME" maxlength="70" size="70" value="<?php echo $sNName;?>"/>}
                ?>
            </td>
        </tr>
        <tr>
            <td><strong>Gruppe:</strong></td>
            <td>
                <input name="KNDGRP" type="text" id="KNDGRP" maxlength="3" size="5" value="<?php echo $sKndGrp;?>"/>   
            </td>
        </tr>
        <tr>
            <td><strong>Version:</strong></td>
            <td><input name="VNR" type="text" id="VNR" maxlength="5" size="10" value="<?php echo $sVNr;?>" disabled="disabled"></td>
        </tr>
        <tr>
            <td><strong>Datum letzter Abruf:</strong></td>
            <td><input name="LASTUSE" type="text" id="LASTUSE" maxlength="10" size="10" value="<?php echo $sLastUse; ?>" disabled="disabled" ></td>
        </tr>
        <tr>
            <td><strong>Erstellungsdatum:</strong></td>
            <td><input name="CREATETIME" type="text" id="CREATETIME"
                        maxlength="10" size="10" value="<?php echo $sCreateTime;?>" disabled="disabled" ></td>
        </tr>
        <tr>
            <td colspan="2">
                <table width="608" border="0">
                    <tr>
                        <td><strong>Gesperrt: </strong><?php
                                if($bLocked > 0){?><input name="LOCKED" type="checkbox" id="LOCKED" checked="checked">}
                                else {<input name="LOCKED" type="checkbox" id="LOCKED" >}
                                ?>
                        </td>
                        <td><strong>light: </strong><?php
                                $sLBox = "<input name='ISLIGHT' type='checkbox' id='ISLIGHT'";
                                if($bLight > 0 ) $sLBox .= " checked='checked'";
                                if ($_SESSION['userType'] == 2) $sLBox .= " disabled";
                                $sLBox .= " />";
                                echo $sLBox;
                                ?>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td><strong>Bundesland:</strong></td>
            <td>
                <select name="BNDLD" id="BNDLD">
                    <?php
                        echo $arrayBndLd[$sBndLd];
                        echo $arrayBndLd[($sBndLd == 1 ? 0 : 1)];
                        echo $arrayBndLd[($sBndLd == 2 ? 0 : 2)];
                        echo $arrayBndLd[($sBndLd == 3 ? 0 : 3)];
                        echo $arrayBndLd[($sBndLd == 4 ? 0 : 4)];
                        echo $arrayBndLd[($sBndLd == 5 ? 0 : 5)];
                        echo $arrayBndLd[($sBndLd == 6 ? 0 : 6)];
                        echo $arrayBndLd[($sBndLd == 7 ? 0 : 7)];
                        echo $arrayBndLd[($sBndLd == 8 ? 0 : 8)];
                        echo $arrayBndLd[($sBndLd == 9 ? 0 : 9)];
                        
                echo"</select>";
            echo"</td>";
        echo "</tr>";
    echo"</table>";
        
    }
 
Werbung:
musste den code splitten wegen der Länge, hier teil 2!!!
PHP:
echo "<br />";
    if ($_SESSION['userType'] != 2)
    {
    ?>
    <span class="StilCaption1">GROSSH&Auml;NDLER</span>
    <table width="390" border="1">
        <tr>
            <td><strong>K&uuml;rzel</strong></td>
            <td><strong>Name</strong></td>
            <td><strong>Lizenz</strong></td>
            <td><strong>Rabatt-Lizenz</strong></td>
        </tr>
        <tr>
            <td width="55">RIC</td>
            <td width="120">Richter</td>
            <td><?php
                if($nKNr)
                {
                    if($nGhFlags&0x100) {echo "<input name='CHECK_LIZ_RIC' type='checkbox' id='CHECK_LIZ_RIC' value='0x100'  checked='checked' />";}
                    else { echo "<input name='CHECK_LIZ_RIC' type='checkbox' id='CHECK_LIZ_RIC' value='0x100' />";}
                }
                else
                {
                    echo "<input name='CHECK_LIZ_RIC' type= 'checkbox' id='CHECK_LIZ_RIC' value='0x100'  checked='checked' />";
                }
                ?>
            </td>
            <td><?php
                if($nKNr)
                {
                    if($nRabFlags&0x100) {echo "<input name='CHECK_RAB_RIC' type='checkbox' id='CHECK_RAB_RIC' value='0x100'  checked='checked' />";}
                    else {echo "<input name='CHECK_RAB_RIC' type='checkbox' id='CHECK_RAB_RIC' value='0x100' />";}
                }
                else
                {
                    echo "<input name='CHECK_RAB_RIC' type='checkbox' id='CHECK_RAB_RIC' value='0x100'  checked='checked' />";
                }
                ?>
            </td>
        </tr>
        <tr>
            <td>GMP</td>
            <td>G&amp;M Pharma</td>
            <td><?php
                if($nGhFlags&0x200)
                    {
                        echo "<input name='CHECK_LIZ_GMP' type='checkbox' id='CHECK_LIZ_GMP' value='0x200'  checked='checked' />";
                    }
                else
                    {
                        echo "<input name='CHECK_LIZ_GMP' type='checkbox' id='CHECK_LIZ_GMP' value='0x200' />";
                    }
                ?>
            </td>
            <td><?php
                if($nRabFlags&0x200)
                {
                    echo "<input name='CHECK_RAB_GMP' type='checkbox' id='CHECK_RAB_GMP' value='0x200'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_RAB_GMP' type='checkbox' id='CHECK_RAB_GMP' value='0x200' />";
                }
                ?>
            </td>
        </tr>
        <tr>
            <td>HER</td>
            <td>Herba Chemosan</td>
            <td><?php
                if($nGhFlags&0x400)
                {
                    echo "<input name='CHECK_LIZ_HER' type='checkbox' id='CHECK_LIZ_HER' value='0x400'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_LIZ_HER' type='checkbox' id='CHECK_LIZ_HER' value='0x400' />";
                }
                ?>
            </td>
            <td><?php
                if($nRabFlags&0x400)
                {
                    echo "<input name='CHECK_RAB_HER' type='checkbox' id='CHECK_RAB_HER' value='0x400'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_RAB_HER' type='checkbox' id='CHECK_RAB_HER' value='0x400' />";
                }
                ?>
            </td>
        </tr>
        <tr>
            <td>JAC</td>
            <td>Jacoby</td>
            <td><?php
                if($nGhFlags&0x800)
                {
                     echo "<input name='CHECK_LIZ_JAC' type='checkbox' id='CHECK_LIZ_JAC' value='0x800'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_LIZ_JAC' type='checkbox' id='CHECK_LIZ_JAC' value='0x800' />";
                }
                ?>
            </td>
            <td><?php
                if($nRabFlags&0x800)
                {
                    echo "<input name='CHECK_RAB_JAC' type='checkbox' id='CHECK_RAB_JAC' value='0x800'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_RAB_JAC' type='checkbox' id='CHECK_RAB_JAC' value='0x800' />";
                }
                ?>
            </td>
        </tr>
        <tr>
            <td>KOE</td>
            <td>L. K&ouml;gl Pharma</td>
            <td><?php
                if($nGhFlags&0x1000)
                {
                    echo "<input name='CHECK_LIZ_KOE' type='checkbox' id='CHECK_LIZ_KOE' value='0x1000'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_LIZ_KOE' type='checkbox' id='CHECK_LIZ_KOE' value='0x1000' />";
                }
                ?>
            </td>
            <td><?php
                if($nRabFlags&0x1000)
                {
                    echo "<input name='CHECK_RAB_KOE' type='checkbox' id='CHECK_RAB_KOE' value='0x1000'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_RAB_KOE' type='checkbox' id='CHECK_RAB_KOE' value='0x1000' />";
                }
                ?>
            </td>
        </tr>
        <tr>
            <td>KWI</td>
            <td>Kwizda</td>
            <td><?php
                if($nGhFlags&0x2000)
                {
                    echo "<input name='CHECK_LIZ_KWI' type='checkbox' id='CHECK_LIZ_KWI' value='0x2000'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_LIZ_KWI' type='checkbox' id='CHECK_LIZ_KWI' value='0x2000' />";
                }
                ?>
            </td>
            <td><?php
                if($nRabFlags&0x2000)
                {
                    echo "<input name='CHECK_RAB_KWI' type='checkbox' id='CHECK_RAB_KWI' value='0x2000'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_RAB_KWI' type='checkbox' id='CHECK_RAB_KWI' value='0x2000' />";
                }
                ?>
            </td>
        </tr>
        <tr>
            <td>PHA</td>
            <td>Pharmason</td>
            <td><?php
                if($nGhFlags&0x4000)
                {
                    echo "<input name='CHECK_LIZ_PHA' type='checkbox' id='CHECK_LIZ_PHA' value='0x4000'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_LIZ_PHA' type='checkbox' id='CHECK_LIZ_PHA' value='0x4000' />";
                }
                ?>
            </td>
            <td><?php
                if($nRabFlags&0x4000)
                {
                    echo "<input name='CHECK_RAB_PHA' type='checkbox' id='CHECK_RAB_PHA' value='0x4000'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_RAB_PHA' type='checkbox' id='CHECK_RAB_PHA' value='0x4000' />";
                }
                ?>
            </td>
        </tr>
        <tr>
            <td>PHO</td>
            <td>Phoenix</td>
            <td><?php
                if($nGhFlags&0x8000)
                {
                    echo "<input name='CHECK_LIZ_PHO' type='checkbox' id='CHECK_LIZ_PHO' value='0x8000'  checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_LIZ_PHO' type='checkbox' id='CHECK_LIZ_PHO' value='0x8000' />";
                }
                ?>
            </td>
            <td><?php
                if($nRabFlags&0x8000)
                {
                    echo "<input name='CHECK_RAB_PHO' type='checkbox' id='CHECK_RAB_PHO'                          value='0x8000'checked='checked' />";
                }
                else
                {
                    echo "<input name='CHECK_RAB_PHO' type='checkbox' id='CHECK_RAB_PHO' value='0x8000' />";
                }
                ?>
            </td>
        </tr>
        <tr>
            <td>
                <?php }
                    echo "<input name='COM' type='submit' ";
                    if ($nKNr > 0)
                    {
                        echo "id='up' value='&Auml;nderungen speichern' />";
                    }
                    else
                    {
                        echo "id='new' value='Anlegen' />";
                    }
                ?>
                <input name="KNR" type="hidden" value="<?php echo $nKNr;?>" />
            </td>
        </tr>
    </table>
</form>
 
Zuletzt bearbeitet:
da sind nee menge Klammern Falsch.
kuck mal zwischen zeile 12- 50
Deine ganzen else Klammern hast du im html rein gemacht obwohl sie in den php dinger rein müssen
<?php }else{ ?>
usw, viel weiter habe ich noch nicht gekuckt weil das sind schon einige
 
Werbung:
naja wie ich bereits sagte bin ich sehr neu hier. hab vor 3 wochen angefangen mit php aber du ahst sicher recht wenn du sagst dass es nicht perfekt formatiert ist. ich hab das nu gefixed nu bekomm ich den fehler "unexpexted else" in der ersten zeile die else hat :(
 
Werbung:
Kuck mal ob du einen Editor findest der das alles vernünftig einrücken und formatieren tut.
Dann weiß man eigentlich auch schon wo welche Klammer zu gehöhrt.

Dann könnte man das ganze hin und her zwischen html und php auch vereinfachen wenn man mehr in php ( echo ) packen würde. Nur dazu können dir die Php Profis mehr sagen wie man das an besten macht. Vieleicht ist deins ja auch schon optimal , deswegen muß da mal ein Profi was zu sagen wie es besser wäre
 
Werbung:
ja dieses hin und hergeswitche verwirrt mich auch am meisten an dem ganzen zeug^^ vl ist es aber auch nur ne sache von Zeit und man gewöhnt sich iwann dran^^ ich werd nich so viel damit zu tun haben also wirds wohl so bleiben wies jetzt ist xD
 
Zuletzt bearbeitet:
Zurück
Oben