Location: PHPKode > projects > Gsys > treasury/edit_transaction.php
<?PHP
//Filename : edit_transaction.php
//Description : Edit a specific transaction.
//Author :  darc
//Last modified :  2006.12.20

    include '../includes/db.php';
    include '../includes/auth_ec.php';

    $trans_num = $_POST['trans_num'];
    $sql = "SELECT * FROM financial WHERE transaction_num = $trans_num LIMIT 1";
    $result = mysql_query($sql,$connection) or die(mysql_error());
    $row = mysql_fetch_array($result);
    
    $pin_num = $row['pin_num'];
    $amount = $row['amount'];
    $description = $row['description'];
?>

<html>
<head>
<title>Edit Transaction</title>
<link href="../includes/index.css" rel="stylesheet" type="text/css">
</head>

<body class="body">
<br />
<table width="810" height="626" border="0" align="center" cellpadding="15">
  <tr> 
    <td height="128" colspan="2"><img src="../images/eg_banner.gif" width="810" height="172"></td>
  </tr>
  <tr> 
    <td width="27%" height="488" valign="top"><?php include '../includes/nav.inc';?> </td>
    <td width="53%">
<form method="post" action="treasury_functions.php?cat=update_transaction">
<input type="hidden" name="added_by" value="<?php session_start(); echo $_SESSION[current_user]; ?>">

<input type="hidden" name="trans_num" value="<?php session_start(); echo $trans_num; ?>">

<strong>Amount:</strong>
<INPUT TYPE="text" NAME="amount" SIZE="3" value="<?php echo $amount; ?>"><br /><br />
<strong>Description:</strong><br />
<textarea cols="40" rows="5" name="description"><?php echo $description; ?></textarea>
<br />
<INPUT TYPE="SUBMIT" NAME="submit" VALUE="Edit Transaction">
</form>
</td>
  </tr>
</table>
</body>
</html>
Return current item: Gsys