$q = "INSERT INTO users (username, email, pass, first_name, mid_initial, last_name, active, agree, date_expires) VALUES (?, ?, ?, ?, ?, ?, ?, 'Agree', DATE_ADD(NOW(), INTERVAL 2 YEAR) )"; // Prepare the statement: $stmt = mysqli_prepare($db, $q); // Bind the variables: mysqli_stmt_bind_param($stmt, 'sssssss', $u, $e, $p, $fn, $mi, $ln, $a); // Assign the values to variables: $u = $_POST['username']; $e = $_POST['email']; $fn = $_POST['first_name']; $mi = $_POST['mid_initial']; $ln = $_POST['last_name']; //$a = $_POST['active']; // Execute the query: mysqli_stmt_execute($stmt); // Send the email: $body = "Thank you for registering at Tired Of Being Ripped Off. To activate your account, please click on this link:\n\n"; $body .= BASE_URL . 'ActivateLU.php?x=' . urlencode($e) . "&y=$a"; mail($trimmed['email'], 'Registration Confirmation', $body, 'From: firstname.lastname@example.org'); // Finish the page: include('ThankYou.html'); // Include the Thank You For Registering exit(); // Stop the page.
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.