The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Radio buttons help
Hey
I'm trying to put data into a database [doh] but can't retrieve it. Basically if the button is checked it puts the value "1" in the database. If it's not checked, well that's where I'm hoping someone can help lol I mean when it comes to editting it, it should already be checked but it isn't. And when I do update, something totally weird happens. Thanks in advance. If it helps, I'm not using the standard Vbulletin $opt thing |
#2
|
||||
|
||||
so if it's checked put a 1 in the db and if it's not put a 0 in the db? is that what you want?
|
#3
|
||||
|
||||
I'll explain a little more - I'm trying to customize Bitsys's battle hack, the "Races" part of it.
Now i'm trying to make a Race one gender only [female]. So when adding a race, you check the button if you want it to be female only. And it's inserting fine into the database [it shows 1- 0 is default] On coming to the main page of the races, it won't show that a race is female, so somehow, I need to retrive that "1" from the database. Then when I reselect it and update the races, the race moves into the "Unknown" Alignment, but I guess that's a different problem. |
#4
|
||||
|
||||
look a bit at member.php
there you can see how the radiobuttons are decoded |
#5
|
||||
|
||||
You can? I just looked an couldn't find anything :/
Also I can't use the makeyesnocode because It might screw it up >.< |
#6
|
||||
|
||||
for example this part of code:
PHP Code:
Code:
<input type=radio value=0 $cookieusernotchecked>No <input type=radio value=1 $cookieuserchecked>Yes |
#7
|
||||
|
||||
Ohhhh that part -
Ich werde dass versuchen [hope that makes sense, not done German for a year ] |
#8
|
||||
|
||||
Lol this is what I've managed to add, but it's not working
PHP Code:
Thanks |
#9
|
||||
|
||||
hmm, it looks right, are you sure $racesex is defined befor it's used in the ifclause?
also yes your german was correct |
#10
|
||||
|
||||
Thanks for the reply - no Xenon, that's the first time where I've used it
So where do I put the ifclause? Towards the end? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|