proskater123 Posted January 28, 2009 Share Posted January 28, 2009 I'm making a sign up page that needs a user to select what game version they are using. At the moment they check the box if they are using expansion pack. If they don't select anything it would make there account the normal game. The values would equal the following: Regular = 0 Burning Crusades = 8 Wotlk = 24 If they don't want the burning crusades or wotlk it automaticly selects the regular. But...... No matter what i choose it selects the regular. heres what makes it all tick sorta... part of the sign up form... <td><td>Using Burning Crusade <small>(Note: Must be installed)</small>:</td> <td><input style="color:#FF0000" type="checkbox" name="tbc" value="1"> </td></tr> <td>Check this box if you are using Wrath of the Linch King <small>(Note: Must be installed)</small>small></td> <td><input style="color:#FF0000" type="checkbox" name="tbc2" value="2"></td></tr> The value part if ($t4 == '1') { $t4 = '8'; } else {$t4 = '0';} if ($t4 == '2') { $t4 = '24'; } else {$t4 = '0';} So what am i doing wrong? The value part of the code is in the page exactly as you see it. Nothing between it. Thanks for helping :) Quote Link to comment Share on other sites More sharing options...
Corruption Posted January 29, 2009 Share Posted January 29, 2009 Private server? Quote Link to comment Share on other sites More sharing options...
nullArray Posted January 29, 2009 Share Posted January 29, 2009 Well, you spelled "Lich" wrong on one line..., ;) You're sure $t4 isn't getting assigned a zero somewhere else? Have you tried putting output statements in all the if/else to track the value of $t4 as the code executes? I don't know what language this is, but am just reciting some generic debugging tips. Quote Link to comment Share on other sites More sharing options...
Oberon Posted March 3, 2009 Share Posted March 3, 2009 Well, you spelled "Lich" wrong on one line..., ;) You're sure $t4 isn't getting assigned a zero somewhere else? Have you tried putting output statements in all the if/else to track the value of $t4 as the code executes? I don't know what language this is, but am just reciting some generic debugging tips. Or further to that, is $t4 getting assigned a value at all? It's hard to tell from the snippet, as $t4 hasn't been set in there until AFTER you check if it's ==1 or ==2. The form elements are named tbc and tbc2. Where's the code to grab the values from those elements and assign them to $t4? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.