title: passing a php variable in $_POST
body: <p>i have a question regarding passing a php variable in the $_POST knowing that i named my buttons using the same variable because i want the buttons to have unique names. </p>
  
  <pre><code>while($row = mysql_fetch_array($query)){
  
          $friend_id = $row['friend_id'];
  
      $result = mysql_query("SELECT username FROM users WHERE user_id = '$friend_id'");
      if (mysql_num_rows($result) &gt; 0) {
      $friendname = mysql_result($result,0,"username");
      $friendname = sanitize($friendname);
      echo '&lt;input type = "submit"  id='. $friend_id .'  name ='.$friend_id.' class = "member" value ='. $friendname.' /&gt;&lt;br&gt;';
      }   
  </code></pre>
  
  <p>here where i am trying to pass it but it is not working </p>
  
  <pre><code>print_r($_POST);
  
  if(isset($_POST['name'])){
  
  
      $signers =  mysql_query("SELECT friend_id  FROM friends WHERE user_id = $session_user_id ");
      $count =    mysql_num_rows($signers);
      if($count == 0){
          echo "&lt;p&gt;you need to add team members&lt;/p&gt;";
      }
  
  else{
      while($row = mysql_fetch_array($signers)){
  
          $signer_id .= $row['friend_id'];
  
  }
  echo '&lt;p&gt;'.$signer_id . '&lt;/p&gt;';
  }
  $request = mysql_query("INSERT INTO requests VALUES ('','$user_id','$fid','$fname','$signer_id')");
  }
  else {
  
      echo '&lt;p&gt; not working &lt;/p&gt;';
  }
  </code></pre>
  
  <p>both of those sections are in the same php page</p>