Yellow Bike Project Hours and Transaction Database for Community Bike Shops
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
892 B

<?php
require_once('../Connections/YBDB.php');
mysql_select_db($database_YBDB, $YBDB);
// update whether paid or not
if(isset($_POST['paid'])) {
if ($_POST['paid'] == 1) {
$query = "UPDATE transaction_log SET paid=1 WHERE transaction_id=" . $_POST['transaction_id'] . ";";
$result = mysql_query($query, $YBDB) or die(mysql_error());
} elseif($_POST['paid'] == 0) {
$query = "UPDATE transaction_log SET paid=0 WHERE transaction_id=" . $_POST['transaction_id'] . ";";
$result = mysql_query($query, $YBDB) or die(mysql_error());
}
}
// update payment type
if(isset($_POST['payment_type'])) {
$query = 'UPDATE transaction_log SET payment_type="' .
$_POST['payment_type'] . '" WHERE transaction_id=' .
$_POST['transaction_id'] . ";";
$result = mysql_query($query, $YBDB) or die(mysql_error());
}
?>