コード例 #1
0
if (!empty($_SESSION["loggedIn"])) {
    header("Location:myprofile.php");
    exit;
}
include_once 'includes/DB.php';
include_once 'lib/enter.php';
$maindb = new DB();
$conn = $maindb->getCon();
$enter = new enter();
if (!empty($_POST["usernamesignup"])) {
    $enter->username = $_POST["usernamesignup"];
    $enter->pass = $_POST["passwordsignup"];
    $enter->email = $_POST["emailsignup"];
    $enter->img = $_FILES["file"]["name"];
    $enter->sign_up();
    $enter->getImg($_FILES["file"]["tmp_name"]);
} else {
    if (!empty($_POST["username"])) {
        $enter->username = $_POST["username"];
        $enter->pass = $_POST["password"];
        $enter->log_in();
    }
}
?>

<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->