PHP : Si râpe à déclaration ou égal à ce jour

  • demonmaestro
  • Gold Member
  • Gold Member
  • Avatar de l’utilisateur
  • Inscription: Juin 21, 2006
  • Messages: 478
  • Loc: Conroe, Texas
  • Status: Offline

Message Décembre 2nd, 2012, 8:03 am

ce que je fais mal ici..??? sa va être un utilisateur de s'abonner chose.

PHP Code: [ 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
  • Inscription: 25 Feb 2008
  • Messages: ?
  • Loc: Ozzuland
  • Status: Online

Message Décembre 2nd, 2012, 8:03 am

  • demonmaestro
  • Gold Member
  • Gold Member
  • Avatar de l’utilisateur
  • Inscription: Juin 21, 2006
  • Messages: 478
  • Loc: Conroe, Texas
  • Status: Offline

Message Décembre 4th, 2012, 6:19 pm

Je suis un idiot. J'essaie de faire les choses trop compliquées à certains moments. Cela fonctionne...

PHP Code: [ 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

Afficher de l'information

  • Total des messages de ce sujet: 2 messages
  • Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 197 invités
  • Vous ne pouvez pas poster de nouveaux sujets
  • Vous ne pouvez pas répondre aux sujets
  • Vous ne pouvez pas éditer vos messages
  • Vous ne pouvez pas supprimer vos messages
  • Vous ne pouvez pas joindre des fichiers
 
 

© 2011 Unmelted, LLC. Ozzu® est une marque déposée de Unmelted, LLC