//This below will create your table for you if it does not exist.
//Feel free to comment it out once the table is created.
$Tables = mysql_query("show tables like '" . $TableName . "'");
$Select mysql_query(" select count(id) from agenda where day '" . $day ."
' and month = '" . $month ."
' and year = '" . $year. "'");
$entry = mysql_fetch_array($Select);
if($entry[0] < 1)
{
if($text != "")
{
$Insert = "insert into " . $TableName . " (text, day, month, year, idutilisateur) values ('" . $text . "', " .
$day . ", " . $month . ", " . $year . " , " . $_COOKIE['ID_UTILISATEUR'] .")";
//If there is no entry in the table for that day, create it.
mysql_query($Insert);
}
}
else
{
if($text != "")
{
$Update "update " . $TableName . " set text'" . $text . "' where day = " . $day .
" and month " . $month . " and year " . $year. " and idutilisateur = " . $_COOKIE['ID_UTILISATEUR'] ;
mysql_query($Update);
}
else
{
$Delete "delete from " . $TableName . " where day " . $day .
" and month " . $month . " and year " . $year. " and idutilisateur = " . $_COOKIE['ID_UTILISATEUR'] ;
//No point in keeping empty records in the table.
mysql_query($Delete);
}
}
}
}
}
function schedule($date)
{
//If no parameter is passed use the current date.
if($date == null)
$date = getDate();
$schedule_html .= "----, \" .
\"<</td>\n\";
//voir pour faire un lien en ajax
$schedule_html .= \"" .
"" . $month_name . " " . $year . ", \n\";
$schedule_html .= \"" .
">, \n\";
$schedule_html .= \"----
\n\";
//Fill the first week of the month with the appropriate number of blanks.
for($week_day = 0; $week_day < $first_week_day; $week_day++)
{
$schedule_html .= \", \";
}
wallysub
Messages postés43Date d'inscriptionlundi 15 septembre 2008StatutMembreDernière intervention25 août 2012 8 janv. 2010 à 16:23
Oui mais je n sais pas ou placer le setlocal on m a conseille de le mettre en début de page mais ça ne change rien du tout, est ce qu il faut apliquer la fonction a chaque champ ? Et même ça je sais pas faire
Vous n’avez pas trouvé la réponse que vous recherchez ?