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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:20:51+00:00 2026-06-18T08:20:51+00:00

I’m making a test for my minecraft whitelist, I have 15 questions and every

  • 0

I’m making a test for my minecraft whitelist, I have 15 questions and every value of question must be = yes, when I have 6 conditions of questions (question1 – question6) , everything is ok and working! But when I add more than 6 conditions (I need 15 conditions for value “yes”), the script not working

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Whitelist</title>
  <style>
    body
    {
    background-image: url('img/background.jpg');
    background-repeat: no-repeat;
    background-position: top left;
    background-attachment: fixed;
    }
  </style>
</head>
<body font="Arial" background="img/background.jpg" background-repeat: "no-repeat" text="#ffffff">
<title>Chunk.cz - Whitelist</title>
</body>

<br><br>
<center><img src="img/chunk-whitelist.png">
<br><br>

<?php

$ip = 'xx.xx.xx.xx'; 

$question1 = $_POST['question1'];
$question2 = $_POST['question2'];
$question3 = $_POST['question3'];
$question4 = $_POST['question4'];
$question5 = $_POST['question5'];
$question6 = $_POST['question6'];
$question7 = $_POST['question7'];

$player = $_POST['player'];

if (!empty($_POST['player'])) {

   if ($question1 == "yes" && $question2 == "yes" && $question3 == "yes" && $question4 == "yes" && $question5 == "yes" && $question6 == "yes" && $question7 == "yes") {

  if(!in_array($param,$bad)) {


      echo '<table width="700" background="img/stone.png">';
      echo '<tr><td height="32" background="img/slab.png"></td></tr>'; 
      echo '<tr><td><center><font size="5" color="#00ff33"><b>Byl si přidán na whitelist pod nickem:</b> ', $hrac;
      echo '<br><b>IP serveru: </b>';
      echo '', $ip;
      echo '</font></center></td></tr><tr><td height="32" background="img/slab.png"></td></tr></table>';

                            $connect = mysql_connect("xx.xx.xx.xx","xxxxxx","xxxxxx");
                            if (!$connect)
                            {
                            die("NELZE SE PRIPOJIT DO DATABAZE! PROSIM OPAKUJTE POKUS POZDEJI. DEKUJI ZA POCHOPENI.");
                            }

                            $DB = mysql_select_db('chunk');

                            if(!$DB)
                            {
                            die("MySQL nemuze vybrat databazi!");
                            }  

                            if(!mysql_query("INSERT INTO whitelist (name)
                            VALUES ('$player')"))
                            {
                            die("Zadost nebyla podana, nemuzeme se spojit s databazi. Omlouvame se, zkuste to pozdeji.)");
                            }


    }
    else { // Špatná odpovìï
      echo '<table width="700" background="img/stone.png">';
      echo '<tr><td height="32" background="img/slab.png"></td></tr>';
      echo '<tr><td height="150"><center><font size="5" color="red"><b>Máš něco špatně, zkus to znova</b></font><br><br>';
      echo '<input type=button onclick="history.back()" value="Zkusit znova">';
      echo '</center></td></tr><tr><td height="32" background="img/slab.png"></td></tr></table>';
    } 
}
else {
  echo '
<table width="700" background="img/stone.png">
<tr><td height="32" background="img/slab.png"></tr></td>  
  <form method="POST">
    <tr><td>
      <center>      
          Napiš svůj nick z minecraft.net: 
            <br><input type="text" name="hrac">
      </center>
    </td></tr>
<tr><td height="32" background="img/slab.png"></tr></td>  
  <tr>
    ', /* Zaèátek otázek */' 

    <tr><td><br><br>
      <b>1. Co je to griefing?</b>
        <br><input type="radio" name="question1" value="no"> To je příkaz pouze pro administrátory, množí si tak materiál.
        <br><input type="radio" name="question1" value="no"> Group briefing - plugin na "schůze" v chatu - vytváří soukromé chatové kanály.
        <br><input type="radio" name="question1" value="yes"> Úmyslné způsobování škody jiným hráčům jakýmkoliv způsobem. Obvykle jde o ničení staveb.
    </td></tr>

    <tr><td><br><br>        
      <b>2. Když se chci k někomu podívat do domu:</b>
        <br><input type="radio" name="question2" value="no"> Pomocí bugu obejdu zamčené dveře, stejně nikdo nic nopozná.
        <br><input type="radio" name="question2" value="yes"> Požádám majitele domu, jestli by mě dál nopozval.
        <br><input type="radio" name="question2" value="no"> Nakouknu dovnitř tak, abych nomusel nic ničit, a pokud se mu to nolíbí, okamžitě odejdu.
        <br><input type="radio" name="question2" value="ne"> Prokopu se dovnitř a díru zase zacpu.
    </td></tr>

    <tr><td><br><br>         
      <b>3. Jaké mody (modifikace hry) nejsou na serveru zakázané?</b>
        <br><input type="radio" name="question3" value="ne"> Na serveru nejsou zakázané žádné mody.
        <br><input type="radio" name="question3" value="ne"> X-ray.
        <br><input type="radio" name="question3" value="yes"> Optifine, Minimapy.
        <br><input type="radio" name="question3" value="ne"> Smart moving.
    </td></tr>

    <tr><td><br><br>         
      <b>4. Jakým příkazem zjistím, kolik mám zrovna peněz?</b>
        <br><input type="radio" name="question4" value="ne"> Napíšu moderátorovi, on mi to řekne.
        <br><input type="radio" name="question4" value="ne"> Na serveru nejsou žádné peníze, jen výměnný obchod.
        <br><input type="radio" name="question4" value="ne"> /penize
        <br><input type="radio" name="question4" value="yes"> /money
    </td></tr>

    <tr><td><br><br>        
      <b>5. K čemu především slouží redstone?</b>     
        <br><input type="radio" name="question5" value="yes"> K vytváření "elektrických drátů" v logických obvodech (například na připojení dveří na páku, která je otevře).
        <br><input type="radio" name="question5" value="ne"> K ničemu, má jen zpomalovat kopání.
        <br><input type="radio" name="question5" value="ne"> K výrobě nástrojů.
    </td></tr>

    <tr><td><br><br>   
      <b>6. Co je hlavním úkolem moderátorů?</b>
        <br><input type="radio" name="question6" value="ne"> Stavět obří projekty.
        <br><input type="radio" name="question6" value="ne"> Teleportovat hráče na požádání.
        <br><input type="radio" name="question6" value="yes"> Dohlížet na dodržování pravidel ve hře.
        <br><input type="radio" name="question6" value="ne"> Rozdávat bany lidem, kteří jim odporují nebo se jim nelíbí.
    </td></tr>

    <tr><td><br><br>
      <b>7. Jak správně natěžím dřevo?</b>
        <br><input type="radio" name="question7" value"ne"> Stačí dřevo na které dosáhnu, zbytek shnije.
        <br><input type="radio" name="question7" value"ne"> Pokácím celý strom tak, aby nezůstalo vůbec žádné dřevo ani listí.
        <br><input type="radio" name="question7" value"yes"> Vykácím všechno dřevo, listí nechám a namísto kmenu dám sazeničku.
        <br><input type="radio" name="question7" value"ne"> Alespoň jeden kousek dřeva se musí nechat, aby strom dorostl.
    </td></tr>

', /*
Pokud budete chtít pøidat další otázku, tak pøipište: 

    <tr><td><br><br>
      <b>#. Nadpis Otázky:</b>
        <br><input type="radio" name="question#" value"ne"> Špatná odpovìï
        <br><input type="radio" name="question#" value"yes"> Správná odpovìï
        <br><input type="radio" name="question#" value"ne"> Špatná odpovìï
    </td></tr>

(všechny znaky "#" nahraïte poøadím otázky (napø pro 7. otázku èíslem 7))
(hodnota value mùže být yes/ne , u správné odpovìdi dejte yes (správná odpoveï mùže být pouze 1!))
*/'    
    ', /* Konec otázek */'    

<tr><td height="32" background="img/slab.png"><center><font color="red">Stisknutím tlačítka potvrzujete, že souhlasíte s <a href="http://www.chunk.cz/pravidla/">pravidly</a> serveru</font><br><input type="submit" value="Odeslat požadavek"></center></tr></td>  
  </tr>
  </table>  
</form>
';
}

?>
</center>
</html>

here is the line of conditions

if ($question1 == "yes" && $question2 == "yes" && $question3 == "yes" && $question4 == "yes" && $question5 == "yes" && $question6 == "yes" && $question7 == "yes") {

when it is like this, it works:

if ($question1 == "yes" && $question2 == "yes" && $question3 == "yes" && $question4 == "yes" && $question5 == "yes" && $question6 == "yes") {

but when I add more conditions, its not working

if ($question1 == "yes" && $question2 == "yes" && $question3 == "yes" && $question4 == "yes" && $question5 == "yes" && $question6 == "yes" && $question7 == "yes" && $question8 == "yes" && $question9 == "yes" && $question10 == "yes" ..........) {

thank you very much for help! this is for minecraft whitelist, sorry for my bad english

  • 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-18T08:20:52+00:00Added an answer on June 18, 2026 at 8:20 am

    I’m not sure why adding more conditions makes your code not work, but you could do something like this:


    $answers=array('question1'=>yes,'question2'=>yes,'question3'=>no); //array of the answers received
    $count=0;
    $requiredCount=3;
    foreach ($answers as $key=>$value){
    if ($value=='yes'){
    $count++;
    }
    }
    if ($count==$requiredCount)
    {
    //process as valid
    }else{
    //process as not valid
    }

    Of course you’d want tabs in the appropriate places to make your code more readable, alas, they get stripped out here.

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

Sidebar

Related Questions

This could be a duplicate question, but I have no idea what search terms
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I have a small JavaScript validation script that validates inputs based on Regex. I
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.