[PHP][MYSQL]Parse error

       

Podstrony


telcocafe

Otoz jestem na etapie tworzenia wlasnego cms'a i mam maly problem:

Parse error: syntax error, unexpected T_IS_EQUAL, expecting ',' or ')' in C:\WebServer\Www\index.php on line 8

w kodzie

<?php require 'core.php'; require 'shell.php'; $page_title = 'Strona G³ówna'; if (isset($_GET['cmd'] == 'show')) { // Tu tkwi diabe³ $query = mysql_query("SELECT * FROM doom_news WHERE news_id={$_GET['id']}");   $row = mysql_fetch_array($query);       $news_id = $row['news_id'];     $news_title = $row['news_title'];     $news_text = $row['news_text'];     $news_date = $row['news_date'];  $news_author = $row['news_author'];         $news_title = stripslashes($news_title);    $news_text = stripslashes($news_text);          header_shell($site_title, $page_title);          news_shell($news_title, $news_date, $news_text, $news_id, $news_author);    footer_shell(); } else { $query = mysql_query("SELECT * FROM doom_news ORDER BY news_date  DESC");   $row = mysql_fetch_array($query);       $news_id = $row['news_id'];     $news_title = $row['news_title'];     $news_text = $row['news_text'];     $news_date = $row['news_date'];  $news_author = $row['news_author'];         $news_title = stripslashes($news_title);    $news_text = stripslashes($news_text);          header_shell($site_title, $page_title);          news_shell($news_title, $news_date, $news_text, $news_id, $news_author);    footer_shell(); } ?>

Co jest nie tak z wierszem numer 8?
U¿ytkownik m_uli edytowa³ ten post 09 pa¼dziernik 2005, 10:24


No chyba brakuje nawiasu:if (isset($_GET['cmd']) == 'show'))

Nie mo¿esz robiæ czego¶ takiego bo samo isset zwraca warto¶æ bool(true/false albo 1/0) która nigdy nie bêdzie siê równaæ 'show' ;). To powinno wygl±daæ chyba tak:
if (isset($_GET['cmd']) && $_GET['cmd'] == 'show'))
U¿ytkownik dh_maniak edytowa³ ten post 09 pa¼dziernik 2005, 10:36
Dzieki glupi blad :D

Temat do zamkniecia i sry za zamieszanie :)
U¿ytkownik m_uli edytowa³ ten post 09 pa¼dziernik 2005, 10:38
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • nvm.keep.pl

  • Sitedesign by AltusUmbrae.