Jump to content

Dummy99

New Members
  • Posts

    7
  • Joined

  • Last visited

Dummy99's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You are absolutely correct. In my initialization of $sw in a start-up file, I was inadvertently setting $sw=0 and of the many times I checked, I missed it. As you said, with $sw='' it would have worked. I thought I had initialized with $sw='' and I therefore couldn't understand why it was not working. After you last statement, I checked again and corrected it. Thank you so much.
  2. Sorry. Special thanks to kicken who said to use === instead of ==, are also in order.
  3. Many thanks to all and in particular to Mac_Gyver who hit it right on. I change my == to === and everything works fine. But I must say it is very peculiar because all of my if's wit == were working fine except this particular one and I'm pretty sure I had similar situations. For the one giving trouble, I had set the $sw='' (which I thought was a blank or nothing) but when I printed it, it was a numeric 0 (which obviously gave me the trouble when I was checking for a 'B"). However, I had at least one other situation where I set $WL='' and when testing for a W, if($WL=='W') ,I was getting correct results (or so it seems - maybe the results were incorrect and I didn't notice it - that's the only explanation I have.) Again, many thanks.
  4. That's what is expected but it doesn't work on my laptop nor on my phone - screen shot below. Any idea why? I doubt it but could it be my web service provider?
  5. My code: if($sw=='B') {print("sw=$sw<br>"); print("<font color=maroon>Buy $amt <font color=red>$sw<br>");} Results: sw=0 Buy $0 0 Neither of these result lines should print. Searched and searched and tested and tested but can't see any error in code. Thanks for you help.
  6. Sorry. No insult to PHP intended. I had been told it was PHP code. Many thanks for you help.
  7. My code doesn't work if I put in the uppercase statement, i.e., it accepts any character. If I leave the uppercase statemnt out, my code works. It seems to me my statement is correct. {newent.value = strtoupper(newent.value) if(newent.value == 'B' || newent.value == 'P' || newent.value == 'T' || newent.value == 'D' ) {EnterSw.value=0;return true;} else{alert('INVALID HAND / MAIN INVALID');newent.select();return false;}} Thanks for your help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.