Hi everyone, I am getting the following error message on a script page I have.
The error is Parse error: syntax error, unexpected T_IF in blah blah blah on line 432

if($paypal != '') {
            $qry = "SELECT * FROM tbl_name WHERE var='$paypal'";
            $result = mysql_query($qry)
            if($row=mysql_fetch_array($result)) { // this is line 432

            $instcount = getInstanceCount($row['txn_id']);

            if($row["item_name"]=="TlsSingleStore" && $instcount>=1){
                               $msg_error = '<div class="p"><img src="http://www.mydomainanme.com/images/3tloading.gif" width="16" height="16"
        hspace="2" vspace="2" align="left" title="Paypal Transaction ID" alt="Paypal Transaction ID" />
        <font color="#FF0000">&nbsp;Paypal Transaction Error</font>&nbsp;Please Check &amp; Try Again</div>
        ';
        $b1=false;
            }elseif($row["item_name"]=="TlsMulitStore" && $instcount>=5){
            $msg_error = '<div class="p"><img src="http://www.mydomainanme.com/images/3tloading.gif" width="16" height="16"
        hspace="2" vspace="2" align="left" title="Paypal Transaction ID" alt="Paypal Transaction ID" />
        <font color="#FF0000">&nbsp;Paypal Transaction Error</font>&nbsp;Please Check &amp; Try Again</div>
        ';
            $b1=false;

            }elseif($row["item_name"]=="TlsDeveloperStore" && $instcount>=10){
            $msg_error = '<div class="p"><img src="http://www.mydomainanme.com/images/3tloading.gif" width="16" height="16"
        hspace="2" vspace="2" align="left" title="Paypal Transaction ID" alt="Paypal Transaction ID" />
        <font color="#FF0000">&nbsp;Paypal Transaction Error</font>&nbsp;Please Check &amp; Try Again</div>
        ';
            $b1=false;
            }

    }else{
        $msg_error = '<div class="p"><img src="http://www.mydomainanme.com/images/3tloading.gif" width="16" height="16"
        hspace="2" vspace="2" align="left" title="Paypal Transaction ID" alt="Paypal Transaction ID" />
        <font color="#FF0000">&nbsp;Paypal Transaction Error</font>&nbsp;Please Check &amp; Try Again</div>
        ';

        $b1=false;
    }
    @mysql_free_result($result);
    }

i have tried adding an additional ")" to the end of line 432, but that does not work, What do I need to do to fix the error and any insight would be appreciated.

Member Avatar for diafol

You need a ; at the end of this line:

$result = mysql_query($qry)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.