It's OK to have a form with more submit buttons? I mean I have a form which contains some input fields and a table and 3 buttons which will export some information in different formats
<form id="form1" name="form1" method="post" >
<label for="country"><strong>Countries: </strong></label><br />
<select id="country" name="country">
<?php
//some php code here
?>
</select>
<br />
<br/>
<label for="start_date"><strong>Start date: </strong></label><br />
<input name="start_date" type="text" id="start_date" value="<?php if(!empty($start))echo $start; ?>" size="20" />
<br />
<br />
<label for="stop_date"><strong>Stop date: </strong></label><br />
<input name="stop_date" type="text" id="stop_date" value="<?php if(!empty($stop)) echo $stop; ?>" size="20" />
<br />
<br />
<input type="submit" name="fill_table" value="Retrieve data" />
<div id="table">
<h1> </h1>
<hr />
<h2>Sales Report</h2>
<table class="display" id="data_table" >
<thead>
<tr>
<th>Product</th>
<th>Date</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
<?php
//some php code here
?>
</tbody>
</table>
<br />
<br />
<br />
<input type="submit" class="button" name="export_xls" value="Export xls" />
<input style="margin-left:10px;" type="submit" name="export_html" value="Export html" />
</form>
Is it ok to do it this way or should i make 3 forms each one having a particular submit button? Each time i press a submit button I'm intrested in the input fields :start_date, stop_date and the selected item from "country". P.S. I want to know if it's optimal and how other programmers would handle this stuff