Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/07/2009, 17:14
Avatar de gjx2
gjx2
 
Fecha de Ingreso: agosto-2008
Ubicación: R.D
Mensajes: 1.153
Antigüedad: 15 años, 8 meses
Puntos: 139
Respuesta: Marcar un type=radio con una variable

Intenta con esto

Código PHP:
$field "h";
switch (
$field){
case 
"h":
echo 
"Mujer: <input type=\"radio\" name=\"sexo\"  value=\"m\"> Hombre: <input type=\"radio\" checked=\"checked\" name=\"sexo\"  value=\"h\">";
break;
case 
"m":
echo 
"Mujer: <input type=\"radio\" name=\"sexo\" checked=\"checked\" value=\"m\"> Hombre: <input type=\"radio\" name=\"sexo\"  value=\"h\">";
break;
default:
echo 
"Error : Verifica que pusiste una seleccion valida";