I have created a form and included this code to call the user information-
It's pulling the data correctly, but it's including the database numbers (example)-
6 6 78 1409 South Lamar Street
7 7 78 Dallas
8 4 78 Texas
9 8 78 75215
10 5 78 USA
11 9 78 214-111-2222
How can I remove the numbers and replace them with the field names (example)-
Street: 1409 South Lamar Street
City: Dallas
State: Texas
Zip Code: 75215
Country: USA
Phone: 214-111-2222
Thanks in advance. On another note, I've only been playing around with this a few hours, but it has to be one of the best Joomla components I've come across. EXCELLENT work. I'll definately vote and buy.
<?php
$database = &JFactory::getDBO(); // only needed once
$user = JFactory::getuser();
$query = "SELECT * FROM jos_juser_extended_data
WHERE user_id='".$user->id."' ";
$database->setQuery( $query );
$rows = $database->loadObjectList();
//$count = $database->getNumRows();
//echo "count: $count<br />";
echo "<table>";
foreach ($rows as $row) {
echo "<tr>";
foreach ($row as $value) {
echo '<td>' .$value .'</td>';
}
echo "</tr>";
}
echo "</table>";?>
It's pulling the data correctly, but it's including the database numbers (example)-
6 6 78 1409 South Lamar Street
7 7 78 Dallas
8 4 78 Texas
9 8 78 75215
10 5 78 USA
11 9 78 214-111-2222
How can I remove the numbers and replace them with the field names (example)-
Street: 1409 South Lamar Street
City: Dallas
State: Texas
Zip Code: 75215
Country: USA
Phone: 214-111-2222
Thanks in advance. On another note, I've only been playing around with this a few hours, but it has to be one of the best Joomla components I've come across. EXCELLENT work. I'll definately vote and buy.