Earn money

query("SELECT * FROM users WHERE email='$email' AND password='$pass'"); if ($res->num_rows > 0) { $_SESSION['email'] = $email; header("Location: dashboard.php"); } else { $error = "Login Failed"; } } ?> Login - PTC Site

Login

$error

"; ?>

Don't have an account? Register

query("INSERT INTO users (email, password, earnings) VALUES ('$email', '$pass', 0)"); $success = "Registered Successfully. Login Now"; } ?> Register - PTC Site

Register

$success

"; ?>
query("SELECT * FROM users WHERE email='$email'"); $user = $res->fetch_assoc(); if (isset($_POST['earn'])) { $conn->query("UPDATE users SET earnings = earnings + 1 WHERE email='$email'"); header("Refresh:0"); } ?> Dashboard - PTC Site

Welcome,

Your Balance:

query("SELECT * FROM users WHERE email='$email'"); $user = $res->fetch_assoc(); if (isset($_POST['withdraw'])) { $number = $_POST['number']; $conn->query("INSERT INTO withdrawals (email, number, amount) VALUES ('$email', '$number', {$user['earnings']})"); $conn->query("UPDATE users SET earnings = 0 WHERE email='$email'"); $msg = "Request Submitted."; } ?> Withdraw - PTC Site

Withdraw

$msg

"; ?>
body { background-color: #f4f6f8; font-family: Arial, sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .container { background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 0 10px rgba(0,0,0,0.1); text-align: center; width: 300px; } input[type="email"], input[type="password"], input[type="text"] { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ccc; border-radius: 5px; } button { padding: 10px 20px; background-color: #007bff; color: white; border: none; border-radius: 5px; cursor: pointer; } button:hover { background-color: #0056b3; } .success { color: green; } .error { color: red; } .links a { color: #007bff; text-decoration: none; } .links a:hover { text-decoration: underline; } -- users: id, email, password, earnings -- withdrawals: id, email, number, amount

Comments