Forums ProgMatique Forum Index Forums ProgMatique
Programmation (C/C++, JAVA, PHP, JavaScript, ...) et Informatique (Webmaster, Web)
Retour au site Progmatique

date par defaut

 
Post new topic   Reply to topic    Forums ProgMatique Forum Index » Programmation » Php / MySQL
Previous topic :: Next topic  
Author Message
valouxa


Offline


Joined: 18 Jan 2009
Posts: 2


PostPosted: Sun 18 Jan 2009 - 21:22    Post subject: date par defaut Reply with quote

Salut!
Je voudrais savoir comment mettre la valeur par defaut d'un champ date à la date système courante!
Rolling Eyes
Back to top
Simon
Administrateur
Administrateur

Offline


Joined: 08 May 2005
Posts: 715
Localisation: France


PostPosted: Mon 19 Jan 2009 - 20:30    Post subject: date par defaut Reply with quote

Bonjour,
la date système que tu veux est celle du serveur ou celle du navigateur?

Pour le serveur, avec php : il faut utiliser date : string date ( string $format [, int $timestamp ] )

Exemple :
Code:
$maintenant = date("H:i:s");


Si tu veux avoir l'heure de l'ordinateur, en php c'est pas possible (langage exécuté coté serveur), mais tu peut le faire en javascript.
_________________
Simon (SimMaster),
Programmation et informatique
Colorisation syntaxique de codes sources
Outils et services autour de l'adresse IP
Back to top
Visit poster’s website
valouxa


Offline


Joined: 18 Jan 2009
Posts: 2


PostPosted: Mon 19 Jan 2009 - 20:35    Post subject: date par defaut Reply with quote

ok merci bcp pr l'aide Bye
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forums ProgMatique Forum Index » Programmation » Php / MySQL All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  

Index | Create a forum | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation
Powered by phpBB v2 © 2001, 2005 phpBB Group ¦ Theme: subSilver++