Add an additional field for the user
5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 4, 2008 (RSS)
By Djulia - April 3, 2008
I would like to add an additional field for the user.
Admin > User Accounts > modify
For example :
Phone
Mailing Address
Is that possible ?
Thank you for your assistance.
Djulia
Re: [Djulia] Add an additional field for the user
By Dave - April 3, 2008
admin.php?menu=database&action=editTable&tableName=accounts
Just be sure to backup /data/schema/accounts.ini.php and not overwrite it next time you upgrade!
Hope that helps!
interactivetools.com
Re: [Dave] Add an additional field for the user
By Djulia - April 4, 2008
But, I have another problem.
Now, I would like to obtain the values of the accounts table on my page (myPage.php).
For example :
Created by <?php echo $pageRecord['username'] ?>
There is a possible solution ?
Thank you for your assistance.
Djulia
Re: [Djulia] Add an additional field for the user
By Dave - April 4, 2008
<?php // load user
$query = "SELECT * FROM {$TABLE_PREFIX}accounts WHERE num = '{$record['createdByUserNum']}'";
$result = mysql_query($query) or die("MySQL Error: ". htmlspecialchars(mysql_error()) . "\n");
$createdByUserRecord = mysql_fetch_assoc($result);
?>
Then you can display user fields like this:
<?php echo $createdByUserRecord['fullname'] ?>
And list all the user fields (for testing) like this:
<xmp><?php print_r($createdByUserRecord); ?></xmp>
Hope that helps! :)
interactivetools.com
Re: [Dave] Add an additional field for the user
By Djulia - April 4, 2008
Djulia