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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:41:02+00:00 2026-06-17T13:41:02+00:00

{if $command2 ne thanks || $command1 ne error} some code <!—Ist Code–> {/if} {if

  • 0
{if $command2 ne "thanks" || $command1 ne "error"}
 some code <!---Ist Code-->
{/if}

{if $command2 eq "thanks" || ($command1 eq "error"}
<meta name="Robots" content="noindex, nofollow"> <!---2nd Code-->
{/if}

I am trying this but its not working.its showing both 1st and 2nd code
Give me one solution

  • 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-17T13:41:03+00:00Added an answer on June 17, 2026 at 1:41 pm

    I think your problem is with logic. Try && operator with ne case like;

    {if $command2 ne "thanks" && $command1 ne "error"}
     some code <!---Ist Code-->
    {/if}
    
    {if $command2 eq "thanks" || ($command1 eq "error"}
    <meta name="Robots" content="noindex, nofollow"> <!---2nd Code-->
    {/if}
    

    it’s a basic programming knowledge. when you invert the case, invert ORs to ANDs, too.

    Keep in mind that depending on your needs, it might be vice versa like;

    {if $command2 ne "thanks" || $command1 ne "error"}
     some code <!---Ist Code-->
    {/if}
    
    {if $command2 eq "thanks" && ($command1 eq "error"}
    <meta name="Robots" content="noindex, nofollow"> <!---2nd Code-->
    {/if}
    

    Both makes sense in different scenerios.

    Update: After your second comment, it’s clear that you need the first example at the top.

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

Sidebar

Related Questions

Thanks to everyone in advance. I've been doing some research on error handling and
Working on some code and I'm given the error when running it from the
In Bash I can easily do something like command1 && command2 || command3 which
I've got some old command-line argument parsing code I wrote 4 years ago for
i have this code that im getting error and, and cant understand why im
I am trying to convert some code that is meant to remove all non-numeric
I see the majority of WPF Ribbon examples out there use some code like
I am experiencing some pretty weird output from some c code. Granted I am
EDIT I added in some error handling to my .vbs file and it is
I have a lot of unmanaged C++ code written quite some time ago. Now,

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.