首页
  • 问答
  • 教程
  • 书籍
  • IT新闻
  • syntax error, unexpected T

            <?php
        if(isset($_POST['zapisz'])) { 
        $zapytanie_update = mysql_query("UPDATE `emotki` SET `kod` = '".$_POST['kod']."',`opis` = '".$_POST['opis']."', `glowna` = '".$_POST['glowna']."' WHERE id= $id");
        echo 'Emotka zapisana.<br/><a href="index.php">&laquo; Powrót</a>';
        }
    
        $usun = $_POST['usun'];
        if(isset($usun == 1)
        {
        $usuwaj = mysql_query("DELETE FROM `emotki` WHERE 'id'= $id");
        }
    
    
    
    else {
    ?>
    

    i have ( ! ) Parse error: syntax error, unexpected T_IS_EQUAL, expecting ',' or ')' in C:wampwwwemotki_adminedytuj.php on line 63

    line 63 is if(isset($usun == 1)

    where is error?


    You're missing a parenthesis:

    if(isset($usun) == 1)
    

    But the comparison is unnecessary anyway. All you need is:

    if(isset($usun))
    

    since isset() returns a boolean value.


    You're missing a parenthesis:

    if(isset($usun == 1)
    

    should be

    if(isset($usun == 1))
    
    链接地址: http://www.djcxy.com/p/12038.html

    上一篇: 返回语句的语法错误

    下一篇: 语法错误,意外的T