mirror of
https://silica.codes/islehorse/HorseIsleWeb.git
synced 2025-05-21 18:46:30 +12:00
Add email validation
This commit is contained in:
parent
9b442b3284
commit
ab50fd5d38
2 changed files with 55 additions and 1 deletions
|
@ -388,6 +388,18 @@ function get_fourm_threads($fourm)
|
|||
return $threads;
|
||||
}
|
||||
|
||||
function get_email(int $userid)
|
||||
{
|
||||
include('config.php');
|
||||
$connect = mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die("Unable to connect to '$dbhost'");
|
||||
$stmt = $connect->prepare("SELECT Email FROM Users WHERE Id=?");
|
||||
$stmt->bind_param("i", $userid);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
$email = $result->fetch_row()[0];
|
||||
return $email;
|
||||
}
|
||||
|
||||
function get_userid(string $username)
|
||||
{
|
||||
include('config.php');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue