I think you might want something like this: $sql ="SELECT company, name, email FROM $table_name WHERE email = '$_POST[email]' AND password = password('$_POST[password]');
$rs = mysql_query ($sql, mysql_connect ('server', 'user', 'pass'); $a = mysql_fetch_array ($rs); echo $a['company']; echo $a['name']; Minus some error checking, this is pretty much it. Marco ----------- php|architect -- The Monthly Magazine For PHP Professionals Visit us on the web at http://www.phparch.com! On Tue, 5 Nov 2002, Ben C. wrote: > 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