Griekis Posted April 23, 2006 Report Share Posted April 23, 2006 Man ir trīs radio pogas. Ieķeksē vienu, ievada DB un ir ok. Kā var izvadīt no DB un lai ieķeksē to kura bija izvēlēta. Jau iepriekš paldies! Link to comment Share on other sites More sharing options...
bubu Posted April 23, 2006 Report Share Posted April 23, 2006 <input type="radio" name="blabla"/> vai <input type="radio" name="blabla" checked="checked"/> Kas tieši nav skaidrs? Link to comment Share on other sites More sharing options...
Delfins Posted April 24, 2006 Report Share Posted April 24, 2006 Uz ātro $selected = $row['opcijas_field']; $vertibas = Array('a','b'); foreach ($vertibas AS $v => $t ) { $sel = ( $v == $selected ) ? 'selected="selected"' : ''; print '<input type=".." '.$sel.' />'; } Link to comment Share on other sites More sharing options...
Griekis Posted April 24, 2006 Author Report Share Posted April 24, 2006 [<input type="radio" name="blabla" value="blabla1"> <input type="radio" name="blabla" value="blabla2"> <input type="radio" name="blabla" value="blabla3"> Kad nolasa no datubāzes radiopogas vērtību attiecīgo ieķeksē. Piemēram no DB nolas ka value=blabla2, tātad otram jābūt iezīmētam... Link to comment Share on other sites More sharing options...
v3rb0 Posted April 24, 2006 Report Share Posted April 24, 2006 skaties bubu un Delfins dotos piemērus. 3šo reizi man (un gan jau citiem ar) to pašu rakstīt ir slinkums :p Link to comment Share on other sites More sharing options...
Recommended Posts