Jump to content

My sign up script problem


proskater123
 Share

Recommended Posts

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 month later...
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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...