Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    If Else statment

    Hi to you all

    i need some help with the php statment if else, i tride some code to work but i cant let it work.

    here you find te code i work around

    PHP Code:
    $max_ploeg 16;
    $stop_ploeg 10;
    $teller_ploeg $totalRows_RecSet_plaatsen-$max_ploeg;
    $error 'Er is een fout optgetreden!! Probeer het later nog eens.';
    $button = ('<a href="goto.php"><input type="button" class="goto" value="go to" /></a>');
    $tl 'te laat';

    if (
    $teller_ploeg==$stop_ploeg) {
        echo 
    $tl;
    }
    else
    {
        echo 
    $button;

    Please help me, im despred

    Thanx to you all

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    I don't see a problem here.
    So long as $totalRows_RecSet_plaatsen is 26, than it will enter the true condition of the if branch. Any other situation it enters the else. Since we have no information on what $totalRows_RecSet_plaatsen is or where it comes from, I can only say that I assume at at least one point in time it will be 26.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •