![]() |
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 |
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?
|
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. |
look a bit at member.php
there you can see how the radiobuttons are decoded :) |
You can? I just looked an couldn't find anything :/
Also I can't use the makeyesnocode because It might screw it up >.< |
for example this part of code:
PHP Code:
Code:
<input type=radio value=0 $cookieusernotchecked>No <input type=radio value=1 $cookieuserchecked>Yes |
Ohhhh that part -
Ich werde dass versuchen [hope that makes sense, not done German for a year ;)] |
Lol this is what I've managed to add, but it's not working
PHP Code:
Thanks |
hmm, it looks right, are you sure $racesex is defined befor it's used in the ifclause?
also yes your german was correct :) |
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? |
nope, not at the end, the position is alright there but you have to add something before.
where ist this setting stored? you have to read it out somewhere befor you can work with it. like in member.php it's read out of the $bbuserinfo array |
The code above is part of a file in the admin panel - I think that's where it's messing up.
However in theory members will be able to update their stats through member.php While we're at coding, where's the code that gives someone with "X" posts their next usertitle? :D. Thanks |
All times are GMT. The time now is 03:03 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|