Autor Zpráva
Demitra11
Profil
kod

<?php
session_start();
if(!isset($_SESSION['prihlasen']) and @$_SESSION['prihlasen']!=1 and $_SESSION['Rechte']!=2){
echo "<h1>Diese seite ist nur für admins</h1>";
exit;
}

if(isset($_POST['news'])){
require '.../db.php';
$autor = $_SESSION['login'];
$datum = time;
$news = $_POST['news'];
$text = $_POST['text'];
$VlozData=mysql_query("INSERT INTO news (news,text,autor,datum) VALUES ('$news', '$text', '$autor', '$datum')") or die (mysql_error());

header("location: index.php");
?>


hlaseni

Parse error: syntax error, unexpected $end in C:wampwwwprojeck_myehcjugendadmin eue_news_action.php on line 20
nightfish
Profil
chybí ti uzavírací závorka k tomu druhému ifu... doporučuju použít nějaký editor, který umí zobrazovat párové závorky (třeba PSPad)
Demitra11
Profil
ok diky pouziju ho
Demitra11
Profil
kod

<?php
session_start();
if(!isset($_SESSION['prihlasen']) and @$_SESSION['prihlasen']!=1 and $_SESSION['Rechte']!=2){
echo "<h1>Diese seite ist nur f³r admins</h1>";
exit;
}

if(isset($_POST['news'])){
require '.../db.php';
$autor = $_SESSION['login'];
$datum = time;
$news = $_POST['news'];
$text = $_POST['text'];
$VlozData=mysql_query("INSERT INTO news (news,text,autor,datum) VALUES ('$news', '$text', '$autor', '$datum')") or die (mysql_error());

header("location: index.php");
?>

vypisuje

Parse error: syntax error, unexpected $end in C:wampwwwprojeck_myehcjugendadmin eue_news_action.php on line 18


a ak sa nemilim 18 riadok je toto

?> co je vtom chyba? podla mna nie
Alphard
Profil
kde uzavíráš závorku otevřenou zde? if(isset($_POST['news'])){
Demitra11
Profil
jj uz to funguje ale itak diky

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0