Frage Parse error: Unclosed '{' on line 31 in /users/test99/www/index.php on line 101

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

XDEYK

Neues Mitglied
27 August 2021
1
0
1
31
Hey Leute!

Ich habe einen PHP Code geschrieben und bekomme als Ausgabe diese Fehlermeldung: Parse error: Unclosed '{' on line 43 in /users/test99/www/index.php on line 103

Mein Code sieht wie folgt aus:


<!DOCTYPE html>


<html lang="at" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="responsive.css">
<link href="https://fonts.googleapis.com/css2?family=Teko:[email protected]&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:[email protected]&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Quicksand:[email protected]&display=swap" rel="stylesheet">
<link rel="icon" href="https://img.icons8.com/nolan/64/autumn.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CONTCAT US</title>
</head>
<body>

<!---HEADER-------------------------------------------------------------------->

<header>
<div class="Logo-1"> <!---LOGO--->
<h1>SEEDS FOR BUCKS</h1>
</div>
<div class="Logo-2">
<img id="Logo-2" src="img/Logo3.png" alt="Logo-2">
</div>
</header>

<!---NAV----------------------------------------------------------------------->

<section>
<nav>
<div id="nav"> <!---NAVIGATION--->
<li><a href="#"> INFOMATION </a></li>
<li><a href="#">| ONLINE SHOP </a></li>
</div>
<hr>
</nav>

<!---SECTION------------------------------------------------------------------->

<?php
if(isset($_POST["button"])){
mail("[email protected]", "Kontaktformular", 'Name: '.$_POST["name"].' Email: '.$_POST["email"].' Priorität: '.$_POST["priorität"].' Nachricht: '.$_POST["message"]);
?>
}


<form action="index.php" method="post">
<div id="Contact-box">
<div id="Headline">
<h1>CONTACT US</h1>
</div>
<input type="text" class="input-field" name="name" placeholder="Name" required>
<input type="text" class="input-field" name="email" placeholder="Email" required>
<textarea type="text" class="input-field textarea-input" name="message" placeholder="Message" required></textarea>
<button type="button" class="button "name="button">SEND</button>
</div>
</section>
</form>

<!---FOOTER-------------------------------------------------------------------->

<footer>
<div class="Icons"> <!---FOOTER-ICONS--->
<div class="Icon-1">
<img id="Icon-1" src="img/icon-1.png" alt="Icon-1">
<p>FAST DELIVERY</p>
</div>
<div class="Icon-2">
<img id="Icon-2" src="img/icon-3.png" alt="Icon-2">
<p>CURRENCY EURO</p>
</div>
<div class="Icon-3">
<img id="Icon-3" src="img/icon-9.png" alt="Icon-3">
<p>CURRENCY BITCOIN</p>
</div>
<div class="Icon-4">
<img id="Icon-4" src="img/icon-6.png" alt="Icon-4">
<p>SAVE DELIVERY</p>
</div>
<div class="Icon-5">
<img id="Icon-5" src="img/icon-7.png" alt="Icon-5">
<p>ANONYM & SECURE</p>
</div>
<div class="Icon-6">
<img id="Icon-6" src="img/icon-8.png" alt="Icon-6">
<p>GOOD QUALITY</p>
</div>
</div>
<div id="Seeds-For-Bucks"> <!---FOOTER-TEXT--->
<p></p>
</div>
</footer>


</body>
</html>

<!---ENDE---------------------------------------------------------------------->
<!---ONLY/FOR/AUSTRIA---------------------------------------------------------->
<!---CEATED/BY/XDEYK----------------------------------------------------------->

<!---SEEDS-FOR-BUCKS-ONLINE-SHOP----------------------------------------------->
 

Sempervivum

Senior HTML'ler
18 Oktober 2016
2.490
475
83
68
Die Frage ist leicht zu beantworten: Die schließende geschweifte Klammer steht nach der schließenden PHP-Klammer, so wäre es richtig:
Code:
<?php
if(isset($_POST["button"])){
mail("[email protected]", "Kontaktformular", 'Name: '.$_POST["name"].' Email: '.$_POST["email"].' Priorität: '.$_POST["priorität"].' Nachricht: '.$_POST["message"]);
}
?>
 
Werbung: