In un file esterno.js ho questo codice...

Codice PHP:
function WebDate_ScrivimiS() {
var 
now = new Date();
var 
year now.getFullYear();
var 
ora now.toTimeString();
var 
nameDay = new Array('domenica','lunedì','martedì','mercoledì','giovedì','venerdì','sabato');
var 
nameMth = new Array('gennaio','febbraio','marzo','aprile','maggio','giugno','luglio','agosto','settembre','ottobre','novembre','dicembre');
document.getElementById("hdn_data_localeS").value nameDay[now.getDay()]+ " " now.getDate() + " " nameMth[now.getMonth()] + " " year " - " ora;

...e lo richiamo nella home e stampa data-ora

Codice PHP:
....

<
input type="hiddenS" id="hdn_data_localeS" name="WebDate_ScrivimiS" />
<
script type="text/javascript">WebDate_ScrivimiS();</script> 
Allora ho messo il richiamo anche nel codice che invia mail di notifica, ma qui non mi stampa la data-ora


Codice PHP:

$data_localeS 
= ($_POST['WebDate_ScrivimiS']); 

...

<
html>
<
head>
</
head>
<
body>
<
table>
<
p style=\"font-family:arial,verdana;font-size:11px;color:#000080;\">$data_localeS</p>

...