Witajcie. Mam skrypt który ma za zadanie dodać opis o mnie. Niby wszystko ładnie tylko mam 1 błąd. A mianowicie:
[b]Parse error:[/b] syntax error, unexpected T_ELSE in [b]/ścieżka do pliku/opis.php[/b] on line [b]34[/b]
a to plik opis.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<meta http-equiv="Content-type" content="text/html"; charset=windows-1250">
<meta name="author" content="Sunrise">
<link rel="stylesheet" href="style.css" type="text/css">
<title>dodaj opis</title>
</HEAD>
<?php
$tresc = $_POST['tresc'];
$obrazek = '<img style="position: absolute; margin: 14px 10px 0px 100px;"src="images/blad.png">';
if($tresc) {
include("includes/db.inc.php");
or
die("".$obrazek. "<h5>Brak połączenia z serverem MySQL</h5>"); or
die("".$obrazek. "<h5>Brak połączenia z bazą danych</h5>");
if($ins) echo "<img style='position: absolute; margin: 14px 10px 0px 100px;'src='images/article.png'><h5>Opis dodano poprawnie<h5><br><a href='?ids=o_firmie'><h5>Powrót</h5></a>";
else echo "<h5>Błąd! Nie udało dodać się opisu.</h5>";
} else echo "".$obrazek."<h5>Uzupełnij wszystkie pola<h5><br><a href='java script:history.back()'><h5>Powrót</h5></a>";
?>
<?php else: ?>
<div id="haslo">
<img style="position: absolute; margin: -5px 0px 0px -25px;"src="images/pencil.png"><p>O Mnie.</p><br>
<div class="box">
<form action="
<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" name="firma" accept-charset="utf-8">
<input type="submit" name="submit" class="pisz" value="">
<input type="reset" name="reset" class="reset" value="">
Opis:<br>
<textarea name="tresc" tabindex="1" title="Opis..." ></textarea><br><br><br><br>
</form>
</div>
</div>
<?php endif; ?>
Ktoś wie co jest grane (IMG:
style_emoticons/default/questionmark.gif)