I am trying to run a simple select on the DB from a HTML form
HTML snippet is
<form Name ="form1" Method ="post" ACTION = "get341Usage.php">
<input type="submit" name="Submit1" value="3 Months" >
</form>
PHP file get341Usage.php
<?php
function get341Usage($org_id,$usage_mnth ) {
$conn = oci_connect('user', 'pass', '//server/ora_instance');
$query = "SELECT usage.* from usage_table usage
where customer_number = ' . $cust_id . '
AND usage_date >= (select add_months(sysdate ,' . $usage_mnth . '))";
$stid = oci_parse($conn, $qryStr);
oci_execute($stid);
oci_free_statement($stid);
}
if(isset($_POST['submit']))
{
getUsage($org_id,$usage_mnth);
}
?>
the reason for the 2 paramters was I wanted to create 3 buttons 3,6,12 monnths where the user to clicks and it prompts to auto save teh data to a csv file (haven't even got to this pary yet!)
any points would be great ...I suspect I'm miles off