Page 1 of 1

parse error.. i cant figure it out..

Posted: Fri May 01, 2009 4:03 am
by jade5357
well i have this code :

Code: Select all

 
$sql1=mysql_query("SELECT personFirstName, personLastName, personMiddleInitial
                                FROM person where personid='$pid'");
            
            $result1 = mysql_fetch_array($sql1);
            $lastname = result1['personLastName'];
            $firstname = result1['personFirstName'];
            $mi = result1['personMiddleInitial'];
 
and all i get is a parse error at this line

Code: Select all

             $lastname = result1['personLastName'];
            $firstname = result1['personFirstName'];
            $mi = result1['personMiddleInitial'];
 
can somebody help me with this.. I can't really figure out why.. thanks in advance

Re: parse error.. i cant figure it out..

Posted: Fri May 01, 2009 4:23 am
by requinix
Variables start with a $.

Re: parse error.. i cant figure it out..

Posted: Fri May 01, 2009 4:25 am
by jade5357
*sigh* very simple indeed... sorry.. i forgot to write the '$' sign again..
thank you very much for the reply :mrgreen: :mrgreen: :mrgreen: