Witam,
Chciałbym prosić o pomoc w rozwiązaniu pewnego być może problemu, dla części przypuszczam banalnego.
Mam formularz, w nim INPUT typu checkbox zmienne value to g1, g2, g3 itd.
Następnie wybrane wartości są wysyłane przy użyciu funkcji implode do tabeli w postaci ciągu g1,g2,g3... rozdzielanego przecinkiem
Powyższy wpis z tabeli chciałbym przekształcić z kolei na zmienne tekstowe które będą wstawiane do wiadomości e-mail, gdzie dla każdego wpisu g(x) będzie przypisany jakiś tekst ofc.
Mogę prosić o pomoc w tym zakresie ?

poniżej ten kod.
  1. <form class="form" action="kontakt.php" method="post">
  2. <p> <input type="checkbox" name="gift[]" value="g1" /> Prezent nr 1 </p>
  3. <p> <input type="checkbox" name="gift[]" value="g2" /> Prezent nr 2 </p>
  4. <p> <input type="checkbox" name="gift[]" value="g3" /> Prezent nr 3 </p>
  5. <p> <input type="checkbox" name="gift[]" value="g4" /> Prezent nr 4 </p>
  6. <p> <input type="checkbox" name="gift[]" value="g5" /> Prezent nr 5 </p>
  7. <p> <input type="checkbox" name="gift[]" value="g6" /> Prezent nr 6 </p>
  8. <p> <input type="checkbox" name="gift[]" value="g7" /> Prezent nr 7 </p>
  9. <p> <input type="checkbox" name="gift[]" value="g8" /> Prezent nr 8 </p>
  10. <p> <input type="checkbox" name="gift[]" value="g9" /> Prezent nr 9 </p>
  11.  
  12. <p class="submit"><input type="submit" value="Wyślij wiadomość" /></p>
  13. <p class="submit"><input type="button" onclick="window.location='index.html'" value="Strona główna" /></p>
  14. </form>


export do mysql

  1. $ins=mysql_query("INSERT INTO `baza` SET `tabela`='" . implode(',',$_POST['gift']) . "', `imie`='$imie', `email`='$email'");


tak to mniej więcej wygląda w skrócie