aboutsummaryrefslogtreecommitdiff
path: root/register.php
diff options
context:
space:
mode:
authorarf20 <aruizfernandez05@gmail.com>2024-03-27 19:20:05 +0100
committerarf20 <aruizfernandez05@gmail.com>2024-03-27 19:20:05 +0100
commit028151379c419a004e17418bdade2dab39dda298 (patch)
treeff49b846734d0ad29f466282cb6c82fdb42e9c88 /register.php
parentb853d962fb1dfe89d30d51de8267916c357a4371 (diff)
downloadarfnet2-cstims-028151379c419a004e17418bdade2dab39dda298.tar.gz
arfnet2-cstims-028151379c419a004e17418bdade2dab39dda298.zip
Fix register and login
Diffstat (limited to 'register.php')
-rwxr-xr-xregister.php7
1 files changed, 3 insertions, 4 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 = "";