par
Aureusms » 22 déc. 2011, 00:09
Hmmmm

pas de Timestamp ?
Essaye cela :
Page fonction editBillet.php
<?php
function editBillet($title,$content,$updated,$id)
{
echo var_dump ($updated);
mysql_query("UPDATE billets SET title = '".mysql_escape_string($title)."', content = '"..mysql_escape_string($content)."', updated = '"..mysql_escape_string($updated)."' WHERE idbillets=".mysql_escape_string($id)."");
}
?>
l'autre page
include("pages/editBillet.php");
date_default_timezone_set('Europe/Paris');
$maintenant = strtotime("now");
$updated=date('Y-m-d H:i:s',$maintenant);
editBillet($_POST['title'], $_POST['content'], $updated,$_GET['id']);
header('Location: index.php');
il faut bien sûr que le formulaire soit posté
Hmmmm #-o pas de Timestamp ?
Essaye cela :
Page fonction editBillet.php
[php]<?php
function editBillet($title,$content,$updated,$id)
{
echo var_dump ($updated);
mysql_query("UPDATE billets SET title = '".mysql_escape_string($title)."', content = '"..mysql_escape_string($content)."', updated = '"..mysql_escape_string($updated)."' WHERE idbillets=".mysql_escape_string($id)."");
}
?>[/php]
l'autre page
[php]include("pages/editBillet.php");
date_default_timezone_set('Europe/Paris');
$maintenant = strtotime("now");
$updated=date('Y-m-d H:i:s',$maintenant);
editBillet($_POST['title'], $_POST['content'], $updated,$_GET['id']);
header('Location: index.php');[/php]
il faut bien sûr que le formulaire soit posté