Autor | Zpráva | ||
---|---|---|---|
Demitra11 Profil |
#1 · Zasláno: 31. 8. 2007, 23:17:52
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 |
#2 · Zasláno: 31. 8. 2007, 23:21:26
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 |
#3 · Zasláno: 1. 9. 2007, 00:06:13
ok diky pouziju ho
|
||
Demitra11 Profil |
#4 · Zasláno: 1. 9. 2007, 00:29:19
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 |
#5 · Zasláno: 1. 9. 2007, 00:33:39
kde uzavíráš závorku otevřenou zde? if(isset($_POST['news'])){
|
||
Demitra11 Profil |
#6 · Zasláno: 1. 9. 2007, 10:58:11
jj uz to funguje ale itak diky
|
||
Časová prodleva: 17 let
|
0