aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xregister.php7
-rw-r--r--verify.php7
2 files changed, 7 insertions, 7 deletions
diff --git a/register.php b/register.php
index 330b2e5..025eb70 100755
--- a/register.php
+++ b/register.php
@@ -1,5 +1,6 @@
<?php
-// Dependency
+// Include config file
+require_once "config.php";
function send_verification_email($rcpt, $code) {
global $mailer;
@@ -14,6 +15,7 @@ function send_verification_email($rcpt, $code) {
}
function send_register_notification($username) {
+ global $link;
// send admin mail
$sql = "SELECT email FROM users WHERE type = 'admin'";
$stmt = mysqli_prepare($link, $sql);
@@ -32,9 +34,6 @@ function send_register_notification($username) {
echo 'Mailer Error [ask arf20]: ' . $mailer->ErrorInfo;
};
}
-
-// Include config file
-require_once "config.php";
// Define variables and initialize with empty values
$username = $password = $confirm_password = $email = "";
diff --git a/verify.php b/verify.php
index 2e4a26a..92ca4f7 100644
--- a/verify.php
+++ b/verify.php
@@ -1,6 +1,10 @@
<?php
+// Include config file
+require_once "config.php";
+
function send_verify_notification($username) {
+ global $link;
// send admin mail
$sql = "SELECT email FROM users WHERE type = 'admin'";
$stmt = mysqli_prepare($link, $sql);
@@ -29,9 +33,6 @@ if (isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true) {
exit;
}
-// Include config file
-require_once "config.php";
-
// Define variables and initialize with empty values
$code = "";
$code_err = "";