Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Parse error: syntax error, unexpected $end
robal94
post
Post #1





Grupa: Zarejestrowani
Postów: 150
Pomógł: 2
Dołączył: 14.06.2009
Skąd: Czestochowa

Ostrzeżenie: (0%)
-----


  1. Parse error: syntax error, unexpected $end
co to za błąd? z czego wynika?

Ten post edytował robal94 17.04.2010, 14:24:22
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
batman
post
Post #2





Grupa: Moderatorzy
Postów: 2 921
Pomógł: 269
Dołączył: 11.08.2005
Skąd: 127.0.0.1




Błąd ten występuje w przypadku pominięcia ostatniej klamry lub średnika.
Go to the top of the page
+Quote Post
tehaha
post
Post #3





Grupa: Zarejestrowani
Postów: 1 748
Pomógł: 388
Dołączył: 21.08.2009
Skąd: Gdynia

Ostrzeżenie: (0%)
-----


zainstaluj sobie jakiś edytor z kolorowaniem składni, to będziesz miał z głowy tego typu problemu bo od razu Ci podświetli gdzie czegoś zapomniałeś
Go to the top of the page
+Quote Post
-gilbertos-
post
Post #4





Goście







Mam podobny problem i nie mogę znaleźć tej niedomkniętej klamry bądź średnika. Proszę o pomoc. Co dwie pary oczu to nie jedna.

<?php
if($_POST['submit'])
{
if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['subject']))
{
$error = true;
}
else
{
$to = "lukaszkoteluk@gmail.com";

$name = trim($_POST['name']);
$email = trim($_POST['email']);
$subject = trim($_POST['subject']);
$information = trim($_POST['information']);
$message = trim($_POST['message']);

$temat = "Formularz kontaktowy";

$messages = "Imię i nazwisko: $name \r\n E-mail: $email \r\n Temat: $subject \r\n Skąd o nas wiesz: $information \r\n Wiadomość: $message";
$headers = "Wiadomość od: . $name";
$mailsent = mail($to, $temat, $messages, $headers);

if($mailsent)
{
$sent = true;
}
}
}

?>
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8" />
<title>CompandCare</title>
<link rel="stylesheet" href="main.css" type="text/css">
<link rel="stylesheet" href="grid.css" type="text/css" media="all">
</head>

<body id="index" class="home">

<header id="banner" class="body">
<img src="images/logo.png" alt="CompandCare"/>

<nav>
<ul>
<li><a href="index.html">home</a></li>
<li><a href="usługi.html">usługi</a></li>
<li class="active"><a href="kontakt1.php">kontakt</a></li>
</ul>
</nav>

</header><!-- banner -->

<footer id="contentinfo" class="body">
<address id="about" class="vcard author">
<div class="bottom">
<div class="container">
<div class="clearfix">
<div class="grid3 first">
<h3>Kontakt</h3>
<div class="wrapper">
<dl class="address">
<dd><span>Telefon kom.:</span>(+48)600090437</dd>
<dd><span>E-mail:</span><a href="lukaszkoteluk@gmail.com">lukaszkoteluk@gmail.com</a></dd>
</dl>
</div>
</div>
<div class="grid6">
<h3>Formularz kontaktowy</h3>
<!-- <?php if($error == true) { ?>
<p class="error">Nie wypełniłeś pola w formularzu. Proszę wypełnić wszystkie pola.</p>
<?php if($sent == true) { ?>
<p class="sent">Dziękujemy za wypełnienie wszystkich rubryk</p>
<?php } ?> -->
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="contacts-form">
<fieldset>
<div class="grid3 first">
<label for="name">Imię i nazwisko:<br />
<input type="text" name="name" />
</label>
<label for="email">E-mail:<br />
<input type="email" name="email" />
</label>
<label for="subject">Temat:<br />
<input type="text" name="subject" />
</label>
<label for="information">Skąd o nas wiesz:<br />
<select>
<option value="z sieci Web">Z sieci Web</option>
<option value="ulotki/ogłoszenia">ulotki/ogłoszenia</option>
<option value="od znajomego">od znajomego</option>
</select>
</label>
</div>
<div class="grid3">Wiadomość:<br />
<textarea name="message"></textarea>
<input type="submit" name="submit" class="submit" value="Wyslij" />

<div class="alignright">
<!--<a href="" class="alt" onClick="document.getElementById('contacts-form').reset();">Wyczyść</a> &nbsp; &nbsp;<a href="#" class="alt" onClick="document.getElementById('contacts-form').submit(); ">Wyślij</a>
<noscript>
<input type="submit" value="Wyślij" style="border: none; background-color: transparent; text-decoration: underline;
</noscript> -->
</div>
</div>
</fieldset>
</form>
</div>
</div>
</div>
</div>
<!--<span class="bio"></span>-->
</address>
<p>Copyright ˆ 2012 Comp&Care<br>All Rights Reserverd.</p>
</footer><!-- /#contentinfo -->
</body>
</html>
Go to the top of the page
+Quote Post
Evinek
post
Post #5





Grupa: Zarejestrowani
Postów: 280
Pomógł: 46
Dołączył: 23.03.2010

Ostrzeżenie: (0%)
-----


...
<!-- <?php if($error == true) { ?>

Brak zamkniętej klamry. A może układaj kod w dobrym notatniku gdzie podświetla składnie? Mamy za Ciebie szukać? Nie od tego jesteśmy.
Go to the top of the page
+Quote Post
Spawnm
post
Post #6





Grupa: Moderatorzy
Postów: 4 069
Pomógł: 497
Dołączył: 11.05.2007
Skąd: Warszawa




Brak bbcode + forum nie parser. Zamykam.
Go to the top of the page
+Quote Post

Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 22:55