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

  • Home
  • SEARCH
  • 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 8557947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:41:32+00:00 2026-06-11T15:41:32+00:00

I have a check function: function checkCandidateEmail($email) { $email = $_POST; if($email) { $candemail

  • 0

I have a check function:

function checkCandidateEmail($email)
    {
         $email = $_POST;

        if($email)
        {
            $candemail = (SQL);
            if(isset($candemail['email']))
            {
              return TRUE;
            } else {
              return FALSE;
            }

            return $canEmailCheck;
        }
    }

I have started to create a function but I am getting NULL

  • 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-11T15:41:33+00:00Added an answer on June 11, 2026 at 3:41 pm

    Please, elaborate more on your questions next time. I am not sure what you attempt to compare, if the $_POST with the SQL query or the argument passed with the SQL query. I assume the former.

    If the email from that SQL table row equals the submitted email, returns TRUE. Else, returns FALSE. Really simplified version. Now it also checks if the user provided an email:

    function checkCandidateEmail()
        {
        if (!$_POST['email']) echo "Error, please provide an email";
        else
          {
          $candemail = (SQL);   // Return a row from a query
          return $candemail['email'] == $_POST['email'];
          }
        }
    

    If an argument is passed, compares that against the database. If none is passed, compares the submitted $_POST[’email’] against the database.

    function checkCandidateEmail($email=null)
        {
        $candemail = (SQL);   // Return a row from a query
        if (!$email) $email = $_POST['email'];
        return $candemail['email'] == $email;
        }
    

    NOTE: In both cases you have to substitute SQL for the right string and function depending on your database.

    NOTE 2: Make sure that your query returns an email, as this simple code does not check if both strings are empty.

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

Sidebar

Related Questions

I have the following $_POST function to check if the fields of 'start', 'middle'
I have a function in testFun.js var testFunc=function{ var hasCar=false; return{ checkCar: function(){ for(var
I have a JS function check(obj) { for( i=0; i<obj.elements.length; i++){ if(obj.elements[i].type==checkbox&&obj.elements[i].checked){ if(confirm(onSubmitMessage)){ return
I have used Javascript onlaod like this: function check() { var pic = new
I have the following JavaScript I am using to save selected check boxes: function
I have this simple code that speaks for itself. <script language='javascript"> function check() {}
I have created this function to check abecedarian with while loop (A word is
Suppose I have created one jQuery function to check if elements exist or not
Does R6RS or Chez Scheme v7.9.4 have a library function to check if a
Hey, so I have created a function to check the DB for unique entries,

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.