Re: Using info from a MySQL Query

From: Date: Wed, 06 Nov 2002 03:27:04 +0000
Subject: Re: Using info from a MySQL Query
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-122923@lists.php.net to get a copy of this message
Sorry, I didn't read correctly the question- There are plenty way to do it for example : $query = mysql_query($sql) ; $ligne=mysql_fetch_array($query) ; echo $ligne['company'] ; echo $ligne['email'] ; or echo mysql_result($query,0,1); ----- Original Message ----- From: "rija" <rija@vatu.com> To: "php" <php-general@lists.php.net>; "Ben C." <benc@cox.net> Sent: Wednesday, November 06, 2002 1:34 PM Subject: Re: [PHP] Using info from a MySQL Query > Put your variables into {} like this '{$_POST['email'] }', > > $sql ="SELECT company, name, email FROM $table_name > WHERE email = '{$_POST[email]}' AND password = > password('{$_POST[password]}')"; > > ----- Original Message ----- > From: "Ben C." <benc@cox.net> > To: <php-general@lists.php.net> > Sent: Wednesday, November 06, 2002 12:09 PM > Subject: [PHP] Using info from a MySQL Query > > > > I am using the following query: > > > > $sql ="SELECT company, name, email FROM $table_name > > WHERE email = '$_POST[email]' AND password = > password('$_POST[password]')"; > > > > Then I am echoing the $email on my form (it works because the person has > posted their e-mail name when logging in). How can I echo the company and > email on to my form as well. Please help. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#122923) next »