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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:00:42+00:00 2026-05-22T22:00:42+00:00

Im having a issue with my code i am working on. I am trying

  • 0

Im having a issue with my code i am working on. I am trying to get a include loaded depending on the status of the user (if they paid and if they have a invalid email. The NULL value is being pulled form the database however it only sends to the entermail.php

Here is my code does anyone see whats wrong?

 function is_premium() {
        $premium_query = mysql_query("SELECT 'authLevel' FROM 'users' WHERE 'fbID' ='".$userId."'");
        $premium = mysql_query($premium_query);
        if ($premium=='1') {
            return true; 
        } else {
            return false;
        }
     }

     function valid_email() {
        $validemail_query = mysql_query("SELECT 'parentEmailOne' FROM 'users' WHERE 'fbID' ='".$userId."'");
        $validemail = mysql_query($validemail_query);
        if ($validemail != 'NULL') {
            return true;
        } else {
            return false;
            }
     }

      if (!empty($session) && is_premium() && valid_email()) {
        include 'indexPremium';

      } else if (!empty($session) && valid_email()) {
        include 'entermail.php';    

     } else if (!empty($session)) {
        include 'indexLoggedIn.php';

    }else{
        include 'indexNotLogged.php'; 
    }
  • 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-05-22T22:00:42+00:00Added an answer on May 22, 2026 at 10:00 pm

    You’re not actually storing the string “NULL” in the database are you? Null is not the same as string “NULL” — perhaps you want something like:

        if (empty($validemail)) {
            return false;
        } else {
            return true;
        }
    

    Or shorter:

    return !empty($validemail);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having an issue converting type. I was trying code like this (minimal,
I'm having an issue with rails involving javascript. Basically, I have the following code:
I'm currently having an issue where I have a javascript object that is trying
trying to get used to restkit at the moment and im having an issue
I'm having a problem trying to get working those 2 plugins together: Localisation (for
I'm having a small bit of trouble trying to get this piece of code
I am trying to get this jGrowl working but I am not having any
I'm having an issue getting some code to work. Is there a way to
I'm having an issue with the following code: private void DataPortal_Fetch(TaskCriteria criteria) { using
Ok. I'm having an issue with the following bit of code: StreamReader arrComputer =

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.