[PHP] inserimento dei tag in una form

Linguaggi di programmazione: php, perl, python, C, bash e tutti gli altri.
treled
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1331
Iscrizione: lunedì 26 aprile 2010, 17:36
Desktop: gnome
Distribuzione: ubuntu 23.04/22.04
Sesso: Maschile
Località: Massa(MS)

Re: [PHP] inserimento dei tag in una form

Messaggio da treled »

riuscito ho solo cambiato il file js da quello normale a questo:
<script src="js/jquery/tag-it.min.js" type="text/javascript" charset="utf-8"></script>
e ha funzionato..

ora per salvare l'id nella tabella news_tags essendo che ho due campi:

Codice: Seleziona tutto

   CREATE TABLE `news_tags` (
  `id` bigint(8) unsigned auto_increment,
  `news_id` int,
  `tags_id` int,
  `_update` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)) ENGINE = MyISAM DEFAULT CHARSET=utf8;
che cosa inserisco essendo che nella form prendo il nome campo : name?

grazie mille. e buona giornata.
treled
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1331
Iscrizione: lunedì 26 aprile 2010, 17:36
Desktop: gnome
Distribuzione: ubuntu 23.04/22.04
Sesso: Maschile
Località: Massa(MS)

Re: [PHP] inserimento dei tag in una form

Messaggio da treled »

tabella tags:

Codice: Seleziona tutto

  
   CREATE TABLE `tags` (
  `id` bigint(8) unsigned auto_increment,
  `name` varchar(255),
  `data` datetime,
  `active` int ,
  `_update` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`),
  UNIQUE KEY name(name)) ENGINE = MyISAM DEFAULT CHARSET=utf8;
treled
Entusiasta Emergente
Entusiasta Emergente
Messaggi: 1331
Iscrizione: lunedì 26 aprile 2010, 17:36
Desktop: gnome
Distribuzione: ubuntu 23.04/22.04
Sesso: Maschile
Località: Massa(MS)

Re: [PHP] inserimento dei tag in una form

Messaggio da treled »

tabella news:

Codice: Seleziona tutto

  CREATE TABLE `news` (
  `id` bigint(8) unsigned auto_increment,
  `_userid` bigint(8),
  `_catid` bigint(8),
  `titolo` varchar(255),
  `intro` longtext,
  `content` longtext,
  `data` datetime,
  `active` int ,
  `_update` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)) ENGINE = MyISAM DEFAULT CHARSET=utf8; 
 
Scrivi risposta

Ritorna a “Programmazione”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 2 ospiti