Learn PHP: IF statements

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • Want more? Explore the library at www.codecourse...
    Official site
    www.codecourse...
    Twitter
    / teamcodecourse

ความคิดเห็น • 10

  • @TheLadzHD
    @TheLadzHD 9 ปีที่แล้ว

    Very helpful tutorial for touching up on what I had learnt previously through self-teaching :)

  • @sofiajaramillo7185
    @sofiajaramillo7185 5 ปีที่แล้ว

    can you use the if statement with a time

  • @Targanto1
    @Targanto1 9 ปีที่แล้ว

    ***** I have a problem, with a comparison operator and I would think you would be the one guy that would help me. WITH php and mysql using XXAMP apache and mysql, I have set up my own log in page. When it compares the password you enter with the password in the database it always says they are not equal when they are. I echoed both of them out right before the if statement that compares them, I did use 2 equal signs like your supposed to. When I echoed them out I compared them and they were both exactly the same. I am thinking maybe the database somehow changes it in a way it detects them as "different." I have it saved in the database as a varchar and the password you enter is input threw the input tag and the type tag is equal to 'Password.' IDK whats wrong with it, but the if statement is basically saying 2 things that are exactly the same are not equal...

    • @Targanto1
      @Targanto1 9 ปีที่แล้ว

      Max van der Hart No, but I don't think it would matter because I echoed them out before the test, and they were exactly the same. You might be right though, my variables are $UserPass, and $Password. So $Password may be the problem. Although it did echo out the right thing when I tested it. Wasn't hashed or anything.

    • @Targanto1
      @Targanto1 9 ปีที่แล้ว

      No, but they are encrypted with MD5(); so I really shouldn't trim them.

  • @Houaha
    @Houaha 10 ปีที่แล้ว +3

    I find myself explaining things in real life with if statements, anyone else do that?

    • @FicTiiiionGFX
      @FicTiiiionGFX 10 ปีที่แล้ว

      anyone ELSE xD

    • @Targanto1
      @Targanto1 9 ปีที่แล้ว

      ***** FicTiiiion
      -------------------------------------------------------PHP----------------------------------------------
      $Houaha = 'IF';
      $FicTiiiion = 'Else';
      if($Houaha == $FictTiiiion) {
      echo 'Something is wrong here';
      } else {
      echo 'One links "IF" statements, and the other likes "ELSE" statements';
      echo 'Time to see this same thing in C++';
      }
      -------------------------------------------------------C++---------------------------------------------
      var isRunning : boolean;
      var Houaha : string;
      var FicTiiiion : string;
      Houaha = 'IF';
      FicTiiiion = 'ELSE';
      isRunning = true;
      main() {
      while(isRunning == true) {
      if(Houaha == FicTiiiion) {
      cout

    • @FicTiiiionGFX
      @FicTiiiionGFX 9 ปีที่แล้ว

      Max van der Hart ***** wow that's cool targanto :)