require('common.php');
require('html.php');
if (isset($_POST['wallet_id'])) {
db_exec('UPDATE wallets SET wallet_desc = ? WHERE wallet_id = ?', htmlenc($_POST['wallet_desc']));
} else {
db_exec('INSERT INTO wallets( wallet_desc ) VALUES ( ? )', htmlenc($_POST['wallet_desc']));
$wallet_id = db_last_insert_id();
db_exec('INSERT INTO walletpaths ( wallet_id ) VALUES ( ? )', $wallet_id);
}
header('Location: wallets.php');
?>