Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/12/2011, 14:32
Avatar de CesarHC
CesarHC
 
Fecha de Ingreso: junio-2011
Ubicación: localhost
Mensajes: 566
Antigüedad: 12 años, 11 meses
Puntos: 56
Respuesta: como puedo crear un if ........

Pues asi:


Código PHP:
Ver original
  1. <?php
  2. $check=$_POST['ch'];
  3.  
  4. if($check == 'aceptar'){
  5.     echo 'Marcado';
  6. }else {
  7.    echo'No Marcado';
  8. }
  9.  
  10. ?>
Código HTML:
Ver original
  1. <form name="formulario"  method="post">
  2. <input type="radio" value="aceptar"  name="ch"><br>
  3. <input type="submit" name="submit" value="Enviar" >
  4. </form>

Si quieres que no se recargue la pagina ya tendras que usar javascript.
__________________
Solo la práctica no te traicionara ¡¡¡¡¡¡

Seguir el camino tu debes PHP The Right Way.