Exforsys
+ Reply to Thread
Results 1 to 2 of 2

PHP If Else Statement gives error

This is a discussion on PHP If Else Statement gives error within the PHP forums, part of the Programming Talk category; Iam using this script Gives error Like This error - Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /site/user_settings.php on line ...

  1. #1
    HE-Man is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    3

    PHP If Else Statement gives error

    Iam using this script

    Gives error Like This

    error - Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /site/user_settings.php on line 150

    PHP Code:
     if($filename != $username".jpg") {
            die(
    "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=user_settings.php?alert=1\">");
        } else {
            
    move_uploaded_file($file$uploaddir.$filename) or die("<center><font color=\"#000000\" size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\">Could not copy file.</font></center>");
            echo 
    "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=user_settings.php?alert=yes\">";
        
        } 



  2. #2
    rachelle is offline Member Array
    Join Date
    Apr 2006
    Answers
    97
    You get error when you miss something from the end of a line like this ' ) ;
    Make a check on this and your problem would be solved.


Latest Article

Network Security Risk Assessment and Measurement

Read More...