source: spip-zone/_plugins_/auto_claves/exec/addclaves.php

Last change on this file was 24040, checked in by gaitan@…, 12 years ago

importando

File size: 492 bytes
Line 
1<?php
2
3if (!defined("_ECRIRE_INC_VERSION")) return;
4
5function exec_addclaves_dist(){
6    include_spip('inc/utils');
7    include_spip('inc/headers');
8
9    $id_article = $_POST['id_article'];
10
11    //agrego cada palabra seleccionada
12    foreach($_POST['palabras'] as $value){
13        $query = spip_query("INSERT IGNORE INTO spip_mots_articles (`id_mot`, `id_article`) VALUES ($value, $id_article)");
14
15    }   
16
17    spip_header("Location: ./?exec=articles&id_article=".$id_article);
18   
19}
20
21
22?>
Note: See TracBrowser for help on using the repository browser.