PHP: Si rallador de declaración o es igual a la fecha

  • demonmaestro
  • Gold Member
  • Gold Member
  • Avatar de Usuario
  • Registrado: Jun 21, 2006
  • Mensajes: 485
  • Loc: Conroe, Texas
  • Status: Offline

Nota Diciembre 2nd, 2012, 8:03 am

lo que estoy haciendo mal aquí..??? va a ser para un usuario suscribirse cosa.

PHP Código: [ Select ]
<?
 
/* The Date needs to be between or equal to the begin and end date. If not between or equal to date then something needs to be shown...*/
$date = date("Y-m-d");
$begin = "2012-11-13";
$end = "2012-12-30";
 
echo $date;
echo" - date<br>";
echo $begin;
echo" - begin<br>";
echo $end;
echo" - end<br><br>";
 
 
$log = $begin <=$date;
echo $log;
echo " - log<br>";
$log1 = $date >= $end;
echo $log1;
echo " - log1<br>";
 
if($log == $log1){ echo "something";}
?>
  1. <?
  2.  
  3. /* The Date needs to be between or equal to the begin and end date. If not between or equal to date then something needs to be shown...*/
  4. $date = date("Y-m-d");
  5. $begin = "2012-11-13";
  6. $end = "2012-12-30";
  7.  
  8. echo $date;
  9. echo" - date<br>";
  10. echo $begin;
  11. echo" - begin<br>";
  12. echo $end;
  13. echo" - end<br><br>";
  14.  
  15.  
  16. $log = $begin <=$date;
  17. echo $log;
  18. echo " - log<br>";
  19. $log1 = $date >= $end;
  20. echo $log1;
  21. echo " - log1<br>";
  22.  
  23. if($log == $log1){ echo "something";}
  24. ?>
Thanks, Josh --DemonMaestro
www.LilNetwork.com
Fun Website www.ShoutsCloud.com
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Diciembre 2nd, 2012, 8:03 am

  • demonmaestro
  • Gold Member
  • Gold Member
  • Avatar de Usuario
  • Registrado: Jun 21, 2006
  • Mensajes: 485
  • Loc: Conroe, Texas
  • Status: Offline

Nota Diciembre 4th, 2012, 6:19 pm

IM un idiota. Trato de hacer las cosas muy complicadas a veces. Esto funciona...

PHP Código: [ Select ]
/* The Date needs to be between or equal to the begin and end date. If not between or equal to date then something needs to be shown...*/
$date = date("Y-m-d");
$end = "2012-12-05";
 
echo $date;
echo" - date<br>";
 
echo $end;
echo" - end<br><br>";
 
if($date >= $end){ echo "something";}
  1. /* The Date needs to be between or equal to the begin and end date. If not between or equal to date then something needs to be shown...*/
  2. $date = date("Y-m-d");
  3. $end = "2012-12-05";
  4.  
  5. echo $date;
  6. echo" - date<br>";
  7.  
  8. echo $end;
  9. echo" - end<br><br>";
  10.  
  11. if($date >= $end){ echo "something";}
Thanks, Josh --DemonMaestro
www.LilNetwork.com
Fun Website www.ShoutsCloud.com

Publicar Información

  • Total de mensajes en este tema: 2 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 249 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC