Hi

The following code is for an advice panel. It should give out a list of members names with a hyperlink to there user_id. Its not complicated. However i seem to be getting this, instead of the actuall data in the table.

Advice for Array(name)

This is the code:

<?php
		
$query = "SELECT name,email,id FROM members";

if ($send = mysql_query($query)) {

while ($line = mysql_fetch_array($send, MYSQL_ASSOC)) 
{
echo "<p>Advice for <a href='writeadvice.php?user=$line(name)'>$line(name)</a><br><br>";
};

} else {
$_SESSION['error'] = 'Sorry, you can not leave advice at this time. Please contact Reece';
}
?>

Oh god i feel so stupid.
I've been looking at this for over 30mins now.

Advice for <a href='writeadvice.php?user=$line(name)'>$line(name)</a><br><br>

Should be

$line[[/B]name[B]]

Also, you don't need a ; at the end of a while and mysql_fetch_assoc is the same as mysql_fetch_array($resultset, MYSQL_ASSOC)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.