I a detail page that returns donations records in a table. Can I have a blank record row at the bottom with a "Save" or "Add" button to add a new record into the database table? Anyone start me out or point me to a good example? Thanks!
Again thanks.
Code:
<?php
$id = isset($_GET['id']);
$username="user";
$host="localhost";
$password="password";
$database="mydatabase";
$con = mysql_connect($host,$username,$password);
if(!$con)
{
die("Unable to select database");
}
mysql_select_db($database,$con);
$sql = "SELECT * FROM donations WHERE donor_id = '$id' ORDER by date";
$result = mysql_query($sql) or die(mysql_error());
?>
<p style="margin-left:25px;"> Donation Info</p>
<table class="example table-autosort table-autofilter table-autopage:10 table-stripeclass:alternate table-page-number:t1page table-page-count:t1pages table-filtered-rowcount:t1filtercount table-rowcount:t1allcount" id="t1">
<thead>
<tr>
<th class="table-sortable:default" title="Click to sort">Date</th>
<th class="table-sortable:default" title="Click to sort">Amount</th>
<th class="table-sortable:default" title="Click to sort">Catagory</th>
<th class="table-sortable:default" title="Click to sort">note</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysql_fetch_array($result))
{
?>
<tr>
<td><?php echo $row['date']?></td>
<td><?php echo $row['amount']?></td>
<td><?php echo $row['catagory']?></td>
<td><?php echo $row['note']?></td>
</tr>
<?php
}
mysql_close($con);
?>
</tbody>
</table>
</div>
Again thanks.