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 7856681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:47:19+00:00 2026-06-02T20:47:19+00:00

I’m just now starting to build so that you get an email to him,

  • 0

I’m just now starting to build so that you get an email to him,
So it means approve user email before you can get inside the page.

if( !isset( $user_found)) {
     //sende email til brugere
     $code = rand(111111111, 999999999);
     //sendere info til brugere.
     $to = $email;
     $subject = "Activate din brugere - .....dk";
     $headers = "From: support@...dk";
     //indhold til email
     $body = "Hej";

     if(empty($errors))
     {
         if ($stmt = $mysqli->prepare('INSERT INTO `brugere` (`email`, `password`) VALUES (?, ?)')) {
             /* Bind parametre */
             $stmt->bind_param('ss', $email, $password);

             /* Sæt værdier på parametrene */
                $email = $_POST["email"];
             $password = sha1($_POST["password"]);

             $stmt->execute();
             /* Luk statement */
             $stmt->close();

             echo "<div id=\"box\"><ul><li>Godkendt brugere</li></ul></div>";

         } else {
             /* Der er opstået en fejl */
             echo 'Der opstod en fejl i erklæringen: ' . $mysqli->error;
         }
     }
 }

It is such that $ code must make a marginal code so that the user does something to the link after.

<?php

if(!empty($_POST))
{              
    if ($stmt = $mysqli->prepare('SELECT * FROM `brugere` WHERE `email` = ?')) {  
        $stmt->bind_param('s', $email);
        $email = $_POST['email'];
        $stmt->execute();
        $stmt->store_result();
        $count = $stmt->num_rows;
        $stmt->close();
         if ($count > 0)
        {
            $user_found = 1;
        }
    }
    else {
        /* Der er opstået en fejl */
        echo 'Der opstod en fejl i erklæringen: ' . $mysqli->error;
    }
    if(!isset($user_found)) {

        //sendere info til brugere.
        $to = $email;
        $subject = "Activate din brugere - .....dk";
        $headers = "From: support@...dk";
        //indhold til email
        $body = "test";


        if(empty($errors))
        {
            if ($stmt = $mysqli->prepare('INSERT INTO `brugere` (`email`, `password`, `code`) VALUES (?, ?, ?)')) {
                /* Bind parametre */
                $stmt->bind_param('ss', $email, $password, $code);

                /* Sæt værdier på parametrene */
                $email = $_POST["email"];
                $password = sha1($_POST["password"]);
                $code;

                $stmt->execute();
                /* Luk statement */
                $stmt->close();

                echo "<div id=\"box\"><ul><li>Godkendt brugere</li></ul></div>";

            } else {
                /* Der er opstået en fejl */
                echo 'Der opstod en fejl i erklæringen: ' . $mysqli->error;
            }
        }
    }
    else {
        echo "<div id=\"box\"><ul><li>Der findes allerede en bruger med denne mail</li></ul></div>";
    }
}

?>

That is how my code looks like,

what I want out of this is that $ code just inside its database and will be sent email to users…

Ask if there is more to learn about it here.

After all ask question;

    <?php
// multiple recipients
$to  = 'aidan@example.com' . ', '; // note the comma
$to .= 'wez@example.com';

// subject
$subject = 'Birthday Reminders for August';

// message
$message = '
<html>
<head>
  <title>Birthday Reminders for August</title>
</head>
<body>
  <p>Here are the birthdays upcoming in August!</p>
  <table>
    <tr>
      <th>Person</th><th>Day</th><th>Month</th><th>Year</th>
    </tr>
    <tr>
      <td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
    </tr>
    <tr>
      <td>Sally</td><td>17th</td><td>August</td><td>1973</td>
    </tr>
  </table>
</body>
</html>
';

// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";

// Mail it
mail($to, $subject, $message, $headers);
?>

How do I do so just to use email comes into the $to = ‘aidan@example.com’

  • 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-02T20:47:22+00:00Added an answer on June 2, 2026 at 8:47 pm

    first of all it would be better if you can write the outputs in english.

    send query strings in mail like

    yourpage.php?user=someuserid&code=randomcode

    just check in page whether user came through your provided query string or not. if he came directly send him to an error page. if he is then check for the code you created using rand function. if that exists, show the content in page.

    the code may follow like this.

    <?php
    if(empty($error))
    {
    show_content();
    }
    ?>
    

    or what ever you can redirect the user to any page you want.

    the code for checking your querystring.

    <?php
    if(!isset($_GET['qstring'])) // qstring for query string name
    {
    // redirect to error page
    }
    else
    {
    $qstring = $_GET['qstring'];
    
    
    //$res_code= mysql_query ()........... (result of )
    //check for availability of your random code and the userid in your database table\
    if(mysql_num_rows($res_code) > 0)
    {
    show_content();
    }
    else
    {
    //again redirect to error page or index page.
    }
    }
    ?>
    

    if the code is available then show the content. you may use switch case instead of if. that depends upon you.

    hope this helps for you buddy.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I have a small JavaScript validation script that validates inputs based on Regex. I
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a

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.