Forum Moderators: coopster
<?while($row = mysql_fetch_array($sql)){?>
name:<?=$row{value}[2]?>
email:<?=$row{value}[4]?>
<?}?>
If you wanted to display all how about just using the field names, like this:
<?php
while($row = mysql_fetch_array($sql)){
echo "name: ".$row['fieldname'];
echo "email: ".$row['fieldemail'];
}
... and welcome to Webmasterworld.
Habtom
[edit] Removed many of the PHP tags
[edited by: Habtom at 12:51 pm (utc) on July 10, 2007]
<?php Unless you have a very good reason, there is no need of setting a table structure that way. It will be hard to maintain it and is not properly normalized. [1][edited by: Habtom at 1:22 pm (utc) on July 10, 2007]
while($row = mysql_fetch_array($sql)){
echo "name: ".$row['value'][0];
echo "email: ".$row['value'];
}
?>
name: oemail: nname: aemail: sname: 2email: 0name: aemail: sname: iemail: nname: Lemail: name: 2email: 7
Is there something that I'm doing wrong in the query?
$sql = mysql_query("SELECT * FROM `user_customuserfields` WHERE userid = '$uid' ORDER BY customid");