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:[EMAIL PROTECTED]]
Sent: Saturday, January 18, 2003 1:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] 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
[EMAIL PROTECTED]
[EMAIL PROTECTED]
subsidiaries of small independent publishing co.
[EMAIL PROTECTED]
[EMAIL PROTECTED]


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

Reply via email to