From 117d7a7ce83dbcf749c88201cd46a3e10efc899b Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Thu, 23 Feb 2017 18:24:01 -0500 Subject: When an ad receives a response, create a hook which emails the poster --- dash/apply.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dash/apply.php') diff --git a/dash/apply.php b/dash/apply.php index ab2652c..d60700e 100644 --- a/dash/apply.php +++ b/dash/apply.php @@ -12,7 +12,9 @@ if (!empty($_POST['apply'])) { $result->free(); dash_fatal('You have already applied to this ad!', $b_config['base_url'].'dash/'); } + $result->free(); $db->query('INSERT INTO responses (adid, uid, comment) VALUES ('.$adid.', '.$b_user['id'].', \''.$db->escape_string($_POST['comments']).'\')') or dash_fatal($db->error); + app_trigger($db->insert_id); dash_fatal('Your application has been submitted.', $b_config['base_url'].'dash/'); } -- cgit v1.2.3