ich habe folgenden Befehl:
Code: Alles auswählen
$sql = "INSERT INTO tour_table(tour_band, tour_day, tour_month, tour_year, tour_city, tour_location)
VALUES ('$tour_band','$tour_day','$tour_month','$tour_year','$tour_city','$tour_location')";
if(!$result = $db->sql_query($sql))
Code: Alles auswählen
<tr>
<td class="row2"> <span class="gen">{L_BAND}:<input class="post" type="text" size="40" maxlength="100"name="tour_band" value="{TOUR_BAND}"><br></td>
</tr>
<tr>
<td class="row2"><span class="gen">{L_DATE}:<input class="post" type="text" size="2" maxlength="2"name="tour_day" value="{TOUR_DAY}">.<input class="post" type="text" size="2" maxlength="2"name="tour_month" value="{TOUR_MONTH}">.<input class="post" type="text" size="4" maxlength="4"name="tour_year" value="{TOUR_YEAR}">
<span class="gen">{L_CITY}:<input class="post" type="text" size="40" maxlength="100"name="tour_city" value="{TOUR_CITY0}">
<span class="gen">{L_LOCATION}:<input class="post" type="text" size="40" maxlength="100"name="tour_location" value="{TOUR_LOCATION0}"> </td>
</tr>
Optisch siehts dann ungefähr so aus:
http://jarofflies.de/tour.php?action=new
Das ganze soll dann immer eine komplette zeile in der Datenbank geben:
|tour_band | tour_day | tour_month | tour_year | tour_city| tour_location |
Ich probier schon 2 tage rum und bring nix zustande.
Vermutlich gehe ich den komplett falschen weg. Hab aber auch noch kein tutorial gefunden das mir weiterhilft.
Am schönsten wär es so zu realisieren wie in der Umfrage funktion des Forums wenn man eine neue umfrage erstellt. Also das anfangs nur ein Feld zur verfügung steht und nach dem absenden ein zweites erscheint usw. Aber ich komm mit dem code in der posting.php nicht ganz zurecht.
Meine Frage daher: Wie ist sowas am besten zu realisieren?