title: 2 forms on same page php
body: <p>My studybook gives me an assignment which requires me to have 2 forms on one page and output them both to the same page. Is this even possible? Both forms work fine independently. Both have the action: </p>
  
  <pre><code>&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;". 
  </code></pre>
  
  <p>Both have a submit button, but the button only submits the form it's part of. This probably makes sence though.</p>
  
  <p>Thing is i need the page to either post both form outputs when clicking one of the 2 submit buttons or press them subsequently but the information from the first form needs to stay on the page.</p>
  
  <p>Is this possible or am i trying do to the impossible?</p>
  
  <p>the forms are as follows;</p>
  
  <p>form 1:</p>
  
  <pre><code>&lt;form name="orderform" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="post"&gt;
  Korting:
   &lt;tr&gt;
   &lt;td&gt;
   &lt;input type="checkbox" name="korting[]" value=15 /&gt; Student 15% &lt;br&gt;
   &lt;input type="checkbox" name="korting[]" value=10 /&gt; Senior 10% &lt;br&gt;
   &lt;input type="checkbox" name="korting[]" value=5 /&gt; Klant 5% &lt;br&gt;
   &lt;hr /&gt;
   &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
   &lt;td&gt;
   betalingswijze
   &lt;input type="radio" name="betalingswijze" value="paypal"&gt; Paypal
   &lt;input type="radio" name="betalingswijze" value="mastercard"&gt; Mastercard
   &lt;input type="radio" name="betalingswijze" value="visa"&gt; Visa
   &lt;hr /&gt;
   &lt;/td&gt;
   &lt;tr&gt;
   &lt;td&gt;
      &lt;img src="toshiba.jpg" alt=" " /&gt;
   &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
   &lt;td&gt;
      Toshiba Sattelite A100-510 Basisprijs 999.99
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;!--Shopping Cart Begin--&gt;
      &lt;input type="hidden" name="toshibaproduct" value="001" /&gt;
      &lt;input type="hidden" name="toshibamerk" value="toshiba" /&gt;
      &lt;input type="hidden" name="toshibamodel" value="Sattelite A100-510" /&gt;
      Operating system &lt;select name="toshibaos" value="Toshiba"&gt;
      &lt;option value="xp"&gt;Windows XP&lt;/option&gt;
      &lt;option value="vista"&gt;Windows Vista&lt;/option&gt;
      &lt;option value="linux"&gt;Linux&lt;/option&gt;
      &lt;/select&gt;
      Aantal: &lt;input type="text" size=2 maxlength=3 name="toshibaaantal" value="0" /&gt;
      &lt;input type="hidden" name="toshibaprijs" value="999.99" /&gt;
  
      &lt;input type="image" src="bestel.jpg" border=0 value="bestellen" /&gt;
      &lt;hr /&gt;
  
   &lt;tr&gt;
   &lt;td&gt;
      &lt;img src="acer.jpg" alt=" " /&gt;
   &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
   &lt;td&gt;
      Acer Aspire 5735Z Basisprijs 529.99
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;    
      &lt;input type="hidden" name="acerproduct" value="002" /&gt;
      &lt;input type="hidden" name="acermerk" value="acer" /&gt;
      &lt;input type="hidden" name="acermodel" value="Aspire 5735Z" /&gt;
      Operating system &lt;select name="aceros" value="Acer"&gt;
      &lt;option value="xp"&gt;Windows XP&lt;/option&gt;
      &lt;option value="vista"&gt;Windows Vista&lt;/option&gt;
      &lt;option value="linux"&gt;Linux&lt;/option&gt;
      &lt;/select&gt;
      Aantal: &lt;input type="text" size=2 maxlength=3 name="aceraantal" value="0" /&gt;
      &lt;input type="hidden" name="acerprijs" value="529.99" /&gt;
  
      &lt;input type="image" src="bestel.jpg" border=0 value="bestellen" /&gt;
      &lt;hr /&gt;
      &lt;/td&gt;&lt;!--Shopping Cart End--&gt;
  &lt;/tr&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Form 2</p>
  
  <pre><code>&lt;form name="klant gegevens" action="&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;" method="post"&gt;
  &lt;table border=1 &gt;
  &lt;tr&gt;
  &lt;td colspan="2"&gt;
      &lt;b&gt;Factuur klantgegevens&lt;/b&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td width="100"&gt;Naam: &lt;/td&gt;
  &lt;td&gt;
      &lt;input type="text" sie="55" name="naam" /&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Adres: &lt;/td&gt;
  &lt;td&gt;
      &lt;input type="text" sie="55" name="adres" /&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Woonplaats:&lt;/td&gt;
  &lt;td&gt;
      &lt;input type="text size="34" name="woonplaats"&gt;
      Postcode:&lt;input type="text" size="6" name="postcode"&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;e-mail:&lt;/td&gt;
  &lt;td&gt;
      &lt;input type="text" size="55" name="email"&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Feedback:&lt;/td&gt;
  &lt;td&gt;
  &lt;textarea cols="40" rows="3" name="commentaar"&gt;
  &lt;/textarea&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;input type="image" src="checkout.png" value="send"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Both have functions which kick in on submit. Sorry for the spacings. I have them better in my own files but i just don't know how to get them right on this site.</p>
  
  <p>Greetings,</p>
  
  <p>Lennart</p>