parse error.. i cant figure it out..

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jade5357
Forum Newbie
Posts: 5
Joined: Thu Apr 30, 2009 4:25 am

parse error.. i cant figure it out..

Post 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
Last edited by Benjamin on Fri May 01, 2009 4:26 am, edited 1 time in total.
Reason: Changed code type from text to php.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

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

Post by requinix »

Variables start with a $.
jade5357
Forum Newbie
Posts: 5
Joined: Thu Apr 30, 2009 4:25 am

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

Post by jade5357 »

*sigh* very simple indeed... sorry.. i forgot to write the '$' sign again..
thank you very much for the reply :mrgreen: :mrgreen: :mrgreen:
Post Reply