Jump to content

[SOLVED] Registration to Profile Page


Joshv1288

Recommended Posts

its there hers the whole code updated for my database

 

   $sql = "SELECT username FROM users";
  $result = mysql_query($sql);
  if ($result) {
    if (mysql_num_rows($result) > 0) {
      // here we loop through each member in the database
      while ($row = mysql_fetch_assoc($result)) {
        /// creating a link out of there uname, and passing there uname through the url.
        echo "<a href=\"profiles.php?member={$row['username']}\">{$row['username']}</a><br />";
      }
    } else {
      echo "No users found";
}
    else {

  echo "Query failed ".mysql_error();
    }
?>

It still missing...

 

$sql = "SELECT username FROM users";
$result = mysql_query($sql);
if ($result) {
  if (mysql_num_rows($result) > 0) {
    // here we loop through each member in the database
    while ($row = mysql_fetch_assoc($result)) {
      /// creating a link out of there uname, and passing there uname through the url.
      echo "<a href=\"profiles.php?member={$row['username']}\">{$row['username']}</a><br />";
    }
  } else {
    echo "No users found";
  }
} else {
  echo "Query failed ".mysql_error();
}

?>

 

Consistent indentation is key to finding these errors.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.