Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8988627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:02:44+00:00 2026-06-15T22:02:44+00:00

MY problem is not the email successfully sending, it is the confirmation page on

  • 0

MY problem is not the email successfully sending, it is the confirmation page on my website. The email has already sent to the user, but when they click the link to activate their password it then brings them to a confirmation page, and it supposed to confirm the activation, and register them, but it is not doing anything at all. IT just shows up a blank page, and i even checked the databases, and nothing is changed. I would like any help, and i also have the code below for it. Any help would be great.

<?php

include('sqlconfig.php');

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
mysql_select_db("$db_name")or die("cannot select DB"); 

/* Confirmation Code */
$passkey=$_GET['passkey'];
$tbl_name1="temp_users";

/*retrieve data */
$sql1="SELECT * FROM temp_users WHERE confirm='$passkey'";
$result1=mysql_query($sql1);

if($result1){
$count=mysql_num_rows($result1);

/*Fetch The data From the table */
if($count==1){
$rows=mysql_fetch_array($result1);
$Email=$rows['email'];
$First_Name=$rows['FirstN'];
$Last_name=$rows['LastN'];
$password=$rows['password']; 
$phone=$rows['phone'];
$tbl_name2="users";

/*Insert data into new users table */
$sql2="INSERT INTO $tbl_name2(First Name, Last Name, Email, Password, phone)VALUES('$First_Name', '$Last_name', '$Email', '$password', '$phone')";
$result2=mysql_query($sql2);
}

/*If passkey is not found*/
else {
echo "Wrong Confirmation code";
}

/*If activation successful, show, and delete old data from temp table*/
if($result2){

echo "Your account has been activated";

// Delete information of this user from table "temp_members_db" that has this passkey 
$sql3="DELETE FROM $tbl_name1 WHERE confirm_code = '$passkey'";
$result3=mysql_query($sql3);

}


}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:02:45+00:00Added an answer on June 15, 2026 at 10:02 pm

    try this.

    if($passkey == NULL) //check for passkey whether it is null or not, this might be the reason of blank screen

    {
    echo “invalid action on page”; // some error message
    }

    else
    {
    $flag = FALSE; // initiate somewhere at the begining of script

        /*retrieve data */
        $sql1="SELECT * FROM temp_users WHERE confirm='$passkey'";
    
        $result1=mysql_query($sql1);
    
        if(mysql_num_rows($result1))
            {
            $rows=mysql_fetch_array($result1);
            $Email=$rows['email'];
            $First_Name=$rows['FirstN'];
            $Last_name=$rows['LastN'];
            $password=$rows['password']; 
            $phone=$rows['phone'];
            $tbl_name2="users";
    
            /*Insert data into new users table */
            $sql2="INSERT INTO $tbl_name2(First Name, Last Name, Email, Password, phone)VALUES('$First_Name', '$Last_name', '$Email', '$password', '$phone')";
            if(mysql_query($sql2))
                {
                $flag = TRUE;
                }
    
            }
        /*If passkey is not found*/
        else 
            {
            echo "Wrong Confirmation code";
            }
    
        /*If activation successful, show, and delete old data from temp table*/
        if($flag)
            {
            echo "Your account has been activated";
            // Delete information of this user from table "temp_members_db" that has this passkey 
            $sql3="DELETE FROM $tbl_name1 WHERE confirm_code = '$passkey'";
            $result3=mysql_query($sql3);
            }
    

    }

    first the code will check whether there is any result coming from the query, if yes then it fetches data and insert into the table2.

    a new variable flag is introduced to check whether query2 is executed, if so then query 3 is executed.

    Edit : first check whether the passkey coming contains some value or not, if no it shows error, else rest of code execute

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

my problem is not about memory leakage, but about memory purge of node.js (expressjs)
This problem is not readily reproducible in a simple example here but was wondering
I'm trying to debug this problem but not sure where exactly i need to
I am stuck with a simple problem but not able to figure out the
I have tried searching over the internet about this problem but not able to
I have been having a problem with this belimy hair for not sending products
I am sure this has been asked already, but I have been trying all
We recently had the problem that important timed emails could not be sent by
They are two users: User - logged in user Guest - not logged in
I had a leaking handle problem (Not enough quota available to process this command.)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.