wieso PHP Parse error: syntax error, unexpected token ";" in /home/emmanuel/Downloads/hp.php on line 11?
<link rel="stylesheet" href="style.css">
<?php
$db = unserialize(file_get_contents('data.php'));
if($db == false){
        $db = array();
}
if($_POST['mail'] == ''){
        if($_POST['name'] == ''){
                if($_POST['pass'] == ''){a
                        if(!array_key_exists($_POST['mail'], $db){
                                $db[$_POST['mail']] = [$_POST['name'], []];
                                file_put_contents('data.php', serialize($db));
                        } 
                }
        }
}
?>
<form action="" method="post">
    <center>
        <label for="firma_name" >name:</label><br>
        <input type="text" class="input" name="name" autocomplete="off"><br>
        <label for="produkte">email:</label><br>
        <input type="text"  class="input" name="mail" autocomplete="off"><br>
        <label for="adresse">pass:</label><br>
        <input type="text"  class="input" name="pass" autocomplete="off"><br>
        <input type="submit" class="anmelde_button" value="anmelden">
    </center>
</form>

wieso PHP Parse error: syntax error, unexpected token ";" in /home/emmanuel/Downloads/hp.php on line 11?

HTML, Webseite, CSS, JavaScript, HTML5, Datenbank, JQuery, MySQL, PHP, Programmiersprache, Webdesign, Webentwicklung, phpMyAdmin
Was mache ich falsch JavaScript?

Ich habe eine Datei mit allein zahlen von 1-100 in einem Array und will nur die letzten 20 es kommt aber immer ein Fehler.

Quellcode:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

<script>

window.setInterval("AutoUpdate()",parseInt(2000));  

function AutoUpdate()
{      
        $.ajaxSetup({ cache: false });
        $.get('LetzteZeilen.txt', function(data) 
        {   
            data = data.replace(/\n/g, "</br>");
            LetzteZeilen(data);
            if (data == 1) 
            {
                location.reload();
            }
        });     
}

function LetzteZeilen(data)
{
    Test = new Array();
    DataSplit = data.split("</br>");


    LetzteZeilen = 20;
    Laenge = DataSplit.length;
    NichtGewollteZeilen = (Laenge-LetzteZeilen);
    i = 0;
    x = 0;
    
    while (i < Laenge) 
    {
        if(i < NichtGewollteZeilen)
        {
            i++;
        }
        else
        {
            Test[x] = DataSplit[i];
            i++;
            x++;
        }
    }

    console.log(Test);
}
</script>
Fehler:
Uncaught TypeError: LetzteZeilen is not a function
    at Object.success (LetzteZeilenTest.php:16:13)
    at j (jquery.min.js:2:26911)
    at Object.fireWith [as resolveWith] (jquery.min.js:2:27724)
    at x (jquery.min.js:4:11065)
Webseite, JavaScript, Programmiersprache, Webentwicklung

Meistgelesene Beiträge zum Thema Webseite