RE: print new account name on new account page?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't use the mysql functions anymore (look into php.weblogs.com) but I
believe what you are looking for is $row['firstName'], not $firstName. (The
extract MAY put them into variables for you but if it does, it's not
necessary, just use the $row array.  Also, tail the log file on your SQL
server to make sure that the select is being executed properly.


=C=

*
* Cal Evans
* Stay plugged into your audience.
* http://www.christianperformer.com
*


-----Original Message-----
From: Addison Ellis [mailto:addison@bellsouth.net]
Sent: Saturday, January 18, 2003 1:58 PM
To: php-db@lists.php.net
Subject:  print new account name on new account page?


hello,
	i have a form someone fills out. on submit it takes them to a
new accounts page that say welcome new member. how can i get their
name to print on the new page from the form they just filled out? i
have been trying the following but it keeps giving me error messages
regardless of how i manipulate the following. thank you for your
time. addison

<?
   include("config.php");
   $sql = "SELECT firstName,lastName FROM accounts
                  WHERE email='$logname'";
   $result = mysql_query($sql)
                or die("Couldn't execute query 1.");
   $row = mysql_fetch_array($result,MYSQL_ASSOC);
   extract($row);
   echo "
         <head><title>New Account Welcome</title></head>
         <h2 align='center' style='margin-top: .7in'>
         Welcome $firstName $lastName</h2>\n";
?>

here is an example of the errors:

Warning: extract() expects first argument to be an array in
/users/infoserv/web/register/ca/new_account.php on line 82
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
addison@bellsouth.net
info@smipco.com
subsidiaries of small independent publishing co.
info@gloabaldog.com
info@momandpocentral.com


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux