title: firing a submit button which is dynamically created in PHP
body: <p>Hi can someone point out where my method has gone wrong. In my code I get a submit button dynamically with the name 'sendme' and once that appears I want to echo a message once the 'sendme' is fired. for that I include if(isset($_POST['sendme'])){...... code but as it seems its not valid code. Please point out how my rational should changed in this scenario. Thank you for looking!</p>
  
  <pre><code>    &lt;?php 
  if(isset($_POST['sendone'])){
  
  $Q = $_POST['txt5'];
  $con=mysql_connect('localhost','root') or die ("Server connection failure!");
  $db=mysql_select_db('db_customer',$con) or die ("Couldn't connect the database");
  $SQL="SELECT * FROM tbl_customer WHERE name='$Q'";
  $run=mysql_query($SQL,$con) or die ("SQL Error");
  $row=mysql_fetch_array($run);
  
  if($row=="")
  {
  echo "No records found";
  }
  else
  {
  echo "&lt;table border='1'&gt;";
  echo "&lt;tr&gt;&lt;td&gt;"."Name :"."&lt;/td&gt;";
  echo "&lt;td&gt;&lt;input type='text' value=".$row['name']."&gt;"."&lt;/td&gt;";
  echo "&lt;td&gt;&lt;input type='submit' id='sendme' name='sendme'&gt;&lt;/td&gt;";
  echo "&lt;/tr&gt;";
  echo "&lt;/table&gt;";
  }
  }
  else {
      // here I'm trying to fire the populated submit button and echo cheers!
  if(isset($_POST['sendme'])){
  echo 'Cheers!';
  }}
  ?&gt;
  </code></pre>