RE: [PHP-DB] print new account name on new account page?
| From: | Cal Evans | Date: | Sun, 19 Jan 2003 00:05:13 +0000 |
| Subject: | RE: [PHP-DB] print new account name on new account page? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24944@lists.php.net to get a copy of this message | ||
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: [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
addison@bellsouth.net
info@smipco.com
subsidiaries of small independent publishing co.
info@gloabaldog.com
info@momandpocentral.com