Take the 2-minute tour ×  How can I send the POST data from my
form to two different pages depending on which post button is
clicked?  My "Export" button sends the POST data to
'export.php', but the "Graphique" button must send the POST data
to the 'graphique.php' page.  Here is my code:  <form
name="TCAgregat" class="TCAgregat" action="export.php"
method="post">      <input type="hidden" name="daco"
value="<?php echo $DConso; ?>"></input>     <input type="hidden"
name="CNS" value="<?php echo $CNewCentres; ?>"></input>
<input type=submit border="0" class="EXP" name="exp"
value="EXPORT" />       <input type=submit border="0"
class="DCB" name="dcb" value="GRAPHIQUE" />  How can I achieve
this?  share|improve this question Put them in separate forms?
–  user1508519 May 3 '13 at 9:41 Or use javascript or acnhor
tags with query strings –  asprin May 3 '13 at 9:41 use ajax
here.. –  Yogesh Suthar May 3 '13 at 9:41 Change form action on
button click. –  dfsq May 3 '13 at 9:41 You can use JavaScript,
to evaluate