0

I have a mysql table I want to echo the name of every user and on click on a certain user show his profile:

$user=mysql_query("SELECT * FROM signup ORDER BY name ASC ");

while($row = mysql_fetch_array($user)){

echo '<a href="profil.php?user='."$row[".username."]".'">'.$row['nume'].' '.$row['prenume']."</a>";

echo "<br>";}

The problem is that i can not figure out how to concatenate $row['username'] with href

The output should look like this: www.abcde.de/profil?user=username

2
  • what output you need please specify it first Commented Feb 5, 2014 at 10:32
  • 1
    echo '<a href="profil.php?user='.$row['username'].'">'.$row['nume'].' '.$row['prenume'].'</a>'; - to many mixed ' and " Commented Feb 5, 2014 at 10:33

1 Answer 1

1

Try this

  echo '<a href="profil.php?user='.$row['username'].'">'.$row['nume'].' '.$row['prenume'].'</a>';
Sign up to request clarification or add additional context in comments.

1 Comment

That is still not right. Where does .username. come from? A fieldname in a table?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.