title: How i can use 2 forms in one page and when click in first submit button show something in second form
body: <p>Image of page: <a href="http://imgur.com/qRBKxdi,zlc9hbf" rel="nofollow">http://imgur.com/qRBKxdi,zlc9hbf</a></p>
  
  <p>Image of database values: <a href="http://imgur.com/qRBKxdi,zlc9hbf#1" rel="nofollow">http://imgur.com/qRBKxdi,zlc9hbf#1</a></p>
  
  <p>When i click in submit button of first form I want to show the values of one row in database in the second form, for example  i put in first form -> id and in textbox value 1 and i click in submit button i want to show the values of that row in the textboxes of the second form like this -> http : // imgur.com / 5ayOGMj (without spaces)</p>
  
  <p>Code: </p>
  
  <pre><code>&lt;form method="post" action="#"&gt;
                      &lt;p&gt;Mostrar evento por:&lt;/p&gt;
                      &lt;p&gt;
                          &lt;select name="select" id="select"&gt;
                              &lt;option selected="selected"&gt;id&lt;/option&gt;
                              &lt;option&gt;Nome do Evento&lt;/option&gt;
                              &lt;option&gt;Data do Evento&lt;/option&gt;
                          &lt;/select&gt;
                      &lt;/p&gt;
                      &lt;p&gt;
                          &lt;input type="text" name="nomeEvento" id="text" width="300"&gt;
                      &lt;/p&gt;
                      &lt;p&gt;
                          &lt;input type="submit" name="submit" value="Mostrar"&gt;
                      &lt;/p&gt;
                  &lt;/form&gt;
                  &lt;?php
                  require ('sql_connect.php');
  
                  if (isset($_POST['submit'])){
                      $selectedItem = mysql_escape_string($_POST['select']);
                      $nomeEvent = mysql_escape_string($_POST['nomeEvento']);
  
                      if (!$_POST['select'] | !$_POST['nomeEvento'])
                      {
                          echo ("&lt;SCRIPT LANGUAGE='JavaScript'&gt;
                              window.alert('Tem de meter um username e uma password')
                              window.location.href='UpdateEvents.php'
                              &lt;/SCRIPT&gt;");
                          exit();
                      }
  
                      $query = "SELECT * FROM `eventos` WHERE '$selectedItem' = '$nomeEvent'";
                      $result = mysql_query($query);
  
                      if (!$result) die ("Database access failed: " . mysql_error());
  
                      while($row = mysql_fetch_array($result))
                      {
                          $coiso1 = $row['nome'];
                          $coiso2 = $row['data'];
                          $coiso3 = $row['descricao'];
                      }
  
                  }                   
                  ?&gt;                
                  &lt;form method="get" action="#"&gt;
                    &lt;p&gt;Nome do Evento:&lt;/p&gt;
                    &lt;p&gt;
                      &lt;input name="text1" type="text" id="text" width="300" value="&lt;?php $coiso1 ?&gt;"&gt;
                    &lt;/p&gt;
                    &lt;p&gt;Data do Evento:&lt;/p&gt;
                    &lt;p&gt;
                      &lt;input type="text" name="text" id="text2" width="300"&gt;
                    &lt;/p&gt;
                    &lt;p&gt;Descrição:&lt;/p&gt;
                    &lt;p&gt;
                      &lt;input type="text" name="text2" id="text3" width="300"&gt;
                    &lt;/p&gt;
                    &lt;p&gt;
                      &lt;input type="submit" name="submit2" value="Alterar"&gt;
                    &lt;/p&gt;
                  &lt;/form&gt;
  </code></pre>