Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- echo '<form name="com" method="POST" action="' . append_sid('calend.php') . '">';
- echo '<p><textarea name="desc" rows="15" cols="135">'.$commentaire.'</textarea></p>';
- echo '<p><input type="submit" name="ok"></input></p>';
- echo '</form>';
- if (isset ($_POST['ok']))
- {
- //$commentaire = request_var('desc', '');
- $commentaire = utf8_normalize_nfc(request_var('desc', '', true));
- //$commentaire=htmlspecialchars($commentaire, ENT_QUOTES);
- //$commentaire=nl2br($commentaire);
- $req = mysql_query ("SELECT * FROM jrtm_jour WHERE id_jours='$dateday' AND id_annee='$dateannee' AND id_mois='$idmonth'");
- if (mysql_numrows($req) > '0')
- {
- $idjour = mysql_result ($req, $zero, "id_jour");
- mysql_query ("UPDATE jrtm_jour SET com_jour='$commentaire' WHERE id_jour='$idjour'");
- }
- else
- {
- mysql_query ("INSERT INTO jrtm_jour (id_jours, id_mois, id_annee, com_jour) VALUE ('$dateday', '$idmonth', '$dateannee', '$commentaire')");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement