Undefined index

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Undefined index

Re: Undefined index

par Ryle » 20 juil. 2016, 14:22

Bonjour,

Le premier message vient de la ligne 16 de formular.php : " $code_cat = $_POST["idCat"]; ". Tu utilises la variable $_POST["idCat"] et php te dis qu'il ne trouve pas d'index idCat dans $_POST. Il est probable qu'aucune valeur n'ait été renseignée pour ce champ ou que le nom ne soit pas bon... bref, pour php tu veux utiliser une variable qui n'existe pas, alors il affiche un avertissement.

Pour éviter cela, il vaut mieux toujours t'assurer que la variable que tu attends a bien été reçue avec isSet ou empty, et si ce n'est pas le cas, utiliser une valeur par défaut. Par exemple
if (isSet($_POST["idCat"])) {
  $code_cat = $_POST["idCat"];
else
  $code_cat = 0;
Si tu sais utiliser l'opérateur ternaire "? :", tu peux aussi écrire les 4 lignes ci-dessus de cette façon :
$code_cat = isSet($_POST["idCat"]) ? $_POST["idCat"] : 0;
Pour l'erreur fatal, comme indiqué dans le message d'erreur, la colonne postnr_kanttnr indiquée dans ta requête n'existe pas dans ta table produits. Vérifies que la colonne existe bien, qu'il n'y a pas d'erreur dans le nom de celle-ci (dans ta requête et dans ta table mysql)

Re: Undefined index

par Henrigo » 19 juil. 2016, 13:24

avec UPDATE voila ce qu'il me renvoi

Notice: Undefined index: idCat in C:\xampp\htdocs\kantteile\formular.php on line 16

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'postnr_kanttnr' in 'field list'' in C:\xampp\htdocs\kantteile\formular.php:40 Stack trace: #0 C:\xampp\htdocs\kantteile\formular.php(40): PDO->query('UPDATE produits...') #1 {main} thrown in C:\xampp\htdocs\kantteile\formular.php on line 40

Re: Undefined index

par Henrigo » 19 juil. 2016, 13:03

en ce qui concerne idCat c'est la ou je suis depasse

Re: Undefined index

par Henrigo » 19 juil. 2016, 12:57

Merci bien Spols,

j'ai finalement resolu cela,
et je pense que mon formulaire doit etre separe en 2 car il ya un formulaire qui est rempli avant l'autre.


en ce qui concerne la requete, je sais pas comment je pourrai m'y prendre.
cela est effectivement relie a un user_id.
je suis nouveau en php Mysql, mais j'aimerai bien savoir quand une user va sur
une page e_commerce et passe une commande, de je ne sais quoi.
sa commande est sauvegarde dans la base de donne et qui doit etre par la suite
recuper par un administrateur.
Moi j'aimerai qu'etand que user je puisse produire un fichier-pdf de mon choix, quelqu'un peut
me dire comment m'y prendre.
Par ailleur j'ai deja trouve comment convertir du html en pdf a l'aide du Dompdf.

Re: Undefined index

par moogli » 19 juil. 2016, 12:33

le message d'erreur est surement dû à la clause insert qui n'est pas super utile sur une insertion.

ce ne serait plus plutôt un update ?

@+

Re: Undefined index

par Spols » 19 juil. 2016, 11:26

Tes boutons d'envoi ne sont pas bon,
il sont hors des balises form, et il n'envoie pas ton formulaire mais effectue une redirection de ta page

il te faut un (ou plusieurs selon le cas) input type="submit" dans ton formulaire pour envoyer les info qu'il contient.

Pour ton problème de requète, je comprends pas ta phrase, si tu dois relier cela à un user_id, il te faut une colonne user_id à remplir ou une requète UPDATE

Re: Undefined index

par Henrigo » 19 juil. 2016, 11:21

Spols,
j'ai oublie de mentionner tout a l'heure que lorsque tu parlais de INSERT sans clause WHERE ,
au fait c'est le choix (produits) d'un USER qui doit etre inserer dans le tableau produits.
j'espere qu'il n'a pas ete mal declare.

Re: Undefined index

par Henrigo » 19 juil. 2016, 11:18

tout en bas
<input type="button" value="Abschicken" onclick="document.location='html_to_pdf/index.php'" />

Re: Undefined index

par kevin254kl » 19 juil. 2016, 11:08

Salut, ou est ton bouton type submit pour envoyer le formulaire?

Re: Undefined index

par Henrigo » 19 juil. 2016, 10:27

voici a quoi ressemble tout le script cequi est sence me renvoye ses index
panier.php
<?php

	if(!(isset($_SESSION['panier']))){
		$panier=array();
	}
	else{
		$panier=$_SESSION['panier'];
	}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
	  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<style type="text/css">
	  html { font-family:Calibri, Arial, Helvetica, sans-serif; font-size:11pt; background-color:white }
	  table { border-collapse:collapse; page-break-after:always }
	  .gridlines td { border:1px dotted black }
	  .b { text-align:center }
	  .e { text-align:center }
	  .f { text-align:right }
	  .inlineStr { text-align:left }
	  .n { text-align:right }
	  .s { text-align:left }
	  td.style5 { vertical-align:middle; text-align:left; padding-right:0px; border-bottom:2px solid #000000 !important; border-top:2px solid #000000 !important; border-left:3px solid #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style6 { vertical-align:middle; border-bottom:none #000000; border-top:none #000000; border-left:none #000000; border-right:none #000000; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:white }
	  td.style7 { vertical-align:middle; text-align:left; padding-right:0px; border-bottom:3px solid #000000 !important; border-top:2px solid #000000 !important; border-left:2px solid #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style8 { vertical-align:middle; text-align:left; padding-right:0px; border-bottom:none #000000; border-top:2px solid #000000 !important; border-left:3px solid #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style9 { vertical-align:middle; text-align:left; padding-right:0px; border-bottom:none #000000; border-top:2px solid #000000 !important; border-left:2px solid #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style40 { vertical-align:middle; text-align:center; border-bottom:1px solid #000000 !important; border-top:3px solid #000000 !important; border-left:1px dashed #BFBFBF !important; border-right:1px dashed #BFBFBF !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:white }
	  td.style41 { vertical-align:middle; text-align:center; border-bottom:0px solid #000000 !important; border-top:3px solid #000000 !important; border-left:0px dashed #BFBFBF !important; border-right:0px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:white }
	  td.style42 { vertical-align:middle; text-align:center; border-bottom:0px solid #000000 !important; border-top:3px solid #000000 !important; border-left:0px dashed #BFBFBF !important; border-right:0px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:white }
	  td.style43 { vertical-align:middle; text-align:center; border-bottom:none #000000; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style44 { vertical-align:middle; text-align:center; border-bottom:none #000000; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:2px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style45 { vertical-align:middle; text-align:center; border-bottom:3px solid #000000 !important; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style46 { vertical-align:middle; text-align:center; border-bottom:3px solid #000000 !important; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:2px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style47 { vertical-align:middle; text-align:center; border-bottom:3px solid #000000 !important; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:3px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style48 { vertical-align:middle; text-align:center; border-bottom:none #000000; border-top:3px solid #000000 !important; border-left:3px solid #000000 !important; border-right:none #000000   }
	  td.style49 { vertical-align:middle; text-align:center; border-bottom:3px #000000; border-top:3px solid #000000 !important; border-left:none #000000; border-right:none #000000; margin-left:3px  }
	  td.style52 { vertical-align:middle; text-align:center; border-bottom:none #000000; border-top:3px solid #000000 !important; border-left:2px solid #000000 !important; border-right:none #000000; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:19pt; background-color:#D8D8D8 }
	  td.style54 { vertical-align:middle; text-align:center; border-bottom:none #000000; border-top:3px solid #000000 !important; border-left:none #000000; border-right:2px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:19pt; background-color:#D8D8D8 } 
	  td.style58 { vertical-align:middle; text-align:center; border-bottom:none #000000; border-top:3px solid #000000 !important; border-left:none #000000; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style59 { vertical-align:middle; text-align:center; border-bottom:none #000000; border-top:3px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style60 { vertical-align:middle; text-align:center; border-bottom:2px solid #000000 !important; border-top:none #000000; border-left:none #000000; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style61 { vertical-align:middle; text-align:center; border-bottom:2px solid #000000 !important; border-top:none #000000; border-left:1px dashed #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style62 { vertical-align:middle; text-align:center; border-bottom:1px solid #000000 !important; border-top:3px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:3px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style63 { vertical-align:middle; text-align:center; border-bottom:2px solid #000000 !important; border-top:1px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:3px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style64 { vertical-align:middle; text-align:center; border-bottom:2px solid #000000 !important; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style65 { vertical-align:middle; text-align:center; border-bottom:2px solid #000000 !important; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:2px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style66 { vertical-align:middle; text-align:right; padding-right:0px; border-bottom:2px solid #000000 !important; border-top:2px solid #000000 !important; border-left:2px solid #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style67 { vertical-align:middle; text-align:left; padding-right:0px; border-bottom:2px solid #000000 !important; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:1px dashed #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  td.style68 { vertical-align:middle; text-align:center; border-bottom:2px solid #000000 !important; border-top:2px solid #000000 !important; border-left:1px dashed #000000 !important; border-right:3px solid #000000 !important; font-weight:bold; color:#000000; font-family:'Calibri'; font-size:11pt; background-color:#D8D8D8 }
	  table.sheet0 col.col0 { width:88.78888787pt }
	  table.sheet0 col.col1 { width:45.41111059pt }
	  table.sheet0 col.col2 { width:45.41111059pt }
	  table.sheet0 col.col3 { width:72.52222139pt }
	  table.sheet0 col.col4 { width:49.47777721pt }
	  table.sheet0 col.col5 { width:32.53333296pt }
	  table.sheet0 col.col6 { width:72.52222139pt }
	  table.sheet0 col.col7 { width:45.41111059pt }
	  table.sheet0 col.col8 { width:45.41111059pt }
	  table.sheet0 col.col9 { width:51.51111052pt }
	  table.sheet0 col.col10 { width:49.47777721pt }
	  table.sheet0 col.col11 { width:33.21111072999999pt }
	  table.sheet0 tr { height:15pt }
	  table.sheet0 tr.row0 { height:33.6pt }
	  table.sheet0 tr.row1 { height:33.6pt }
	  table.sheet0 tr.row2 { height:33.6pt }
	  table.sheet0 tr.row3 { height:33.6pt }
	  table.sheet0 tr.row4 { height:34.9pt }
	  table.sheet0 tr.row5 { height:25.15pt }
	  table.sheet0 tr.row6 { height:25.15pt }
	  table.sheet0 tr.row7 { height:25.15pt }
	  table.sheet0 tr.row8 { height:25.15pt }
	  table.sheet0 tr.row9 { height:25.9pt }
	  table.sheet0 tr.row10 { height:25.9pt }
	  table.sheet0 tr.row11 { height:25.9pt }
	  table.sheet0 tr.row12 { height:25.9pt }
	  table.sheet0 tr.row13 { height:25.9pt }
	  table.sheet0 tr.row14 { height:25.9pt }
	  table.sheet0 tr.row15 { height:25.9pt }
	  table.sheet0 tr.row16 { height:25.9pt }
	  table.sheet0 tr.row17 { height:34.9pt }
	  table.sheet0 tr.row18 { height:25.15pt }
	  table.sheet0 tr.row19 { height:25.15pt }
	  table.sheet0 tr.row20 { height:25.15pt }
	  table.sheet0 tr.row21 { height:25.15pt }
	  table.sheet0 tr.row22 { height:25.9pt }
	  table.sheet0 tr.row23 { height:25.9pt }
	  table.sheet0 tr.row24 { height:25.9pt }
	  table.sheet0 tr.row25 { height:25.9pt }
	  table.sheet0 tr.row26 { height:25.9pt }
	  table.sheet0 tr.row27 { height:25.9pt }
	  table.sheet0 tr.row28 { height:25.9pt }
	  table.sheet0 tr.row29 { height:25.9pt }
	  table.sheet0 tr.row30 { height:34.9pt }
	  table.sheet0 tr.row31 { height:25.15pt }
	  table.sheet0 tr.row32 { height:25.15pt }
	  table.sheet0 tr.row33 { height:25.15pt }
	  table.sheet0 tr.row34 { height:25.15pt }
	  table.sheet0 tr.row35 { height:25.9pt }
	  table.sheet0 tr.row36 { height:25.9pt }
	  table.sheet0 tr.row37 { height:25.9pt }
	  table.sheet0 tr.row38 { height:25.9pt }
	  table.sheet0 tr.row39 { height:25.9pt }
	  table.sheet0 tr.row40 { height:25.9pt }
	  table.sheet0 tr.row41 { height:25.9pt }
	  table.sheet0 tr.row42 { height:25.9pt }
	</style>
  </head>
  <body>
<style>
@page { left-margin: 0.7086614173228347in; right-margin: 0.7086614173228347in; top-margin: 0.7874015748031497in; bottom-margin: 0.7874015748031497in; }
body { left-margin: 0.7086614173228347in; right-margin: 0.7086614173228347in; top-margin: 0.7874015748031497in; bottom-margin: 0.7874015748031497in; }
</style>

  <form method="post" action="formular.php">
	<table border="0" cellpadding="0" cellspacing="0" id="sheet0" class="sheet0 gridlines" align="center" width="98%">
		<col class="col0">
		<col class="col1">
		<col class="col2">
		<col class="col3">
		<col class="col4">
		<col class="col5">
		<col class="col6">
		<col class="col7">
		<col class="col8">
		<col class="col9">
		<col class="col10">
		<col class="col11">
		<tbody> <!--<img style ="margin-top: 1px;" src='bilder/logo3.png' height="47" >-->
        <tr class="row0">
			<td class="column0 style48 s style49" colspan="3"><img style =" height=32" src='images/logo.gif'></td>
			<td class="column3 style52 s style54" colspan="6">Kantteilbestellung</td>
			<td class="column9 style58 s style59" colspan="2">Seite: </td>
			<td class="column11 style62 s style62">/</td>
		  </tr>
		  <tr class="row2">
			<td class="column0 style5 s">Bauvorhaben:</td>
			<td class="column1 style64 s style65" colspan="6"><input type="text" name="bauvorhaben" size="40" maxlength="40" required="required"></td>
			<td class="column7 style66 s style67" colspan="2">Auftrags-Nr.:</td>
			<td class="column9 style64 s style68" colspan="3"><input type="text" name="auftrags_nr" size="10" maxlength="8" required="required"></td>
		  </tr>
		  <tr class="row3">
			<td class="column0 style8 s">Fassade:</td>
			<td class="column1 style43 s style44" colspan="2"><input type="text" name="fassade" size="10" maxlength="6"required="required"></td>
			<td class="column3 style9 s">Bearbeiter:</td>
			<td class="column4 style43 s style44" colspan="2"><input type="text" name="bearbeiter" size="15" maxlength="13"required="required"></td>
			<td class="column6 style7 s">Datum:</td>
			<td class="column7 style45 n style46" colspan="2"><input type="text" name="datum" size="10" maxlength="8" required="required"></td>
			<td class="column9 style7 s">Termin:</td>
			<td class="column10 style45 n style47" colspan="2"><input type="text" name="termin" size="10" maxlength="8" required="required"></td>
		  </tr>
		  <tr class="row4">
			<td class="column1 style40 n style42" colspan="2"></td>
			<td class="column4 style40 n style41" colspan="2"></td>
			<td class="column7 style40 n style42" colspan="2"></td>
		  </tr>
		  </tr>
		  </tbody>
	</table>
  </form>	
  </body>
</html>

<table border="1">
    
	<tr>
		<th>Hier ist die Liste Ihrer ausgewählten Kantteile</th>
	</tr>
 
<?php
     var_dump($_POST);
	$total=0;
	for($i=0;$i<count($panier);$i++){
	$total=$total+ $panier[$i]['photo'];

?>

	<tr>
		<td><?php echo($panier[$i]['photo']) ?></td>
		<td><a href="supprimerdupanier.php?index=<?php echo($i)?>">Löschen</a></td>
	</tr>

<?php

}

?>

	

</table>

<input type="button" value="Abschicken" onclick="document.location='html_to_pdf/index.php'" /> 
<a>oder</a> 
<input type="button" value="Speichern"  onclick="document.location='datensicher.php'"/>

Re: Undefined index

par Henrigo » 19 juil. 2016, 10:23

il me revoit malheureusement
array(0) { }
ca veut dire que que je fait quelque pas du tout bien.

Re: Undefined index

par Spols » 19 juil. 2016, 08:02

tes premières erreurs signifie que ta variable $_POST ne contient pas les index cités, vérifie donc le formulaire qui envoi ces données ou fait un var_dump($_POST); pour voir ce qui est envoyé à ton script et si les index sont correct.

Pour la dernière erreur, tu fais un INSERT, il n'y a pas de clause WHERE à mettre.

Tu devrais mieux protéger ta requète des injection sql, et ne pas accepter tel quel les variable venant de POST ou GET

Undefined index

par Henrigo » 19 juil. 2016, 07:54

Salut a tous,
de nouveau des erreurs donc je n'arrive pas a corriger, peut etre quelqu'un de bien gentil pourra m'aider
merci d'avance.


Notice: Undefined index: bauvorhaben in C:\xampp\htdocs\kant\formular.php on line 7

Notice: Undefined index: fassade in C:\xampp\htdocs\kant\formular.php on line 8

Notice: Undefined index: bearbeiter in C:\xampp\htdocs\kant\formular.php on line 9

Notice: Undefined index: auftrags_nr in C:\xampp\htdocs\kant\formular.php on line 10

Notice: Undefined index: datum in C:\xampp\htdocs\kant\formular.php on line 11

Notice: Undefined index: termin in C:\xampp\htdocs\kant\formular.php on line 12

Notice: Undefined index: idCat in C:\xampp\htdocs\kantteile\formular.php on line 16

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE code_cat = ''' at line 2' in C:\xampp\htdocs\kantteile\formular.php:35 Stack trace: #0 C:\xampp\htdocs\kantteile\formular.php(35): PDO->query('INSERT produits...') #1 {main} thrown in C:\xampp\htdocs\kantteile\formular.php on line 35


formular.php
<?php
	session_start();
	require_once("connection.php");
	
	
	$bauvorhaben =$_POST["bauvorhaben"];
	$fassade =$_POST["fassade"];
	$bearbeiter =$_POST["bearbeiter"];
	$auftrags_nr =$_POST["auftrags_nr"];
	$datum =$_POST["datum"];
	$ternmin =$_POST["termin"];
	
	$user_id = $_SESSION["user_id"]; 
	
    $code_cat = $_POST["idCat"];
	$pos_nr = $_POST["pos_nr"];
	$farbe = $_POST["farbe"];
	$anzahl_laenge_1 = $_POST["anzahl_laenge_1"];
	$anzahl_laenge_2 = $_POST["anzahl_laenge_2"];
	$anzahl_laenge_3 = $_POST["anzahl_laenge_3"];
	$anzahl_laenge_4 = $_POST["anzahl_laenge_4"];
	$bemerkungen = $_POST["bemerkungen"];
	//$code_cat = $_POST["idCat"];
	
	$a = $_POST["a"];
	$b = $_POST["b"];
	$c = $_POST["c"];
	$d = $_POST["d"];
	$e = $_POST["e"];
	$alpha = $_POST["alpha"];
	$beta = $_POST["beta"];
    
	/*$abfrage = $dbConnect->query("INSERT produits SET $bauvorhaben = 'bauvorhaben', $fassade = 'fassade' $bearbeiter = 'bearbeiter' $auftrags_nr = 'auftrags_nr', $datum = 'datum', $termin = 'termin',
	                                                  postnr_kanttnr = '$pos_nr', farbe = '$farbe', anzahl_laenge_1 = '$anzahl_laenge_1', anzahl_laenge_2 = '$anzahl_laenge_2',anzahl_laenge_3 = '$anzahl_laenge_3',
					                                  anzahl_laenge_4 = '$anzahl_laenge_4', bemerkungen = '$bemerkungen', a = $a, b = $b, c = $c, d = $d, e = $e, alpha = $alpha, beta = $beta, user_id = '$user_id'  WHERE code_cat = '$code_cat'");*/
					
					
	$abfrage = $dbConnect->query("INSERT produits SET postnr_kanttnr = '$pos_nr', farbe = '$farbe', anzahl_laenge_1 = '$anzahl_laenge_1', anzahl_laenge_2 = '$anzahl_laenge_2',anzahl_laenge_3 = '$anzahl_laenge_3',
					anzahl_laenge_4 = '$anzahl_laenge_4', bemerkungen = '$bemerkungen', a = $a, b = $b, c = $c, d = $d, e = $e, alpha = $alpha, beta = $beta, user_id = '$user_id'  WHERE code_cat = '$code_cat'");

	if($abfrage) {

		?>
        
			<p>Der Eintrag wurde gespeichert!</p>

			<script type="text/javascript">

			<!--

				setTimeout("self.location.href='index.php'",3000);

			//-->

			</script>

		<?php
		

	}

	else {

		?>

			<p><a href="javascript:history.back();">zur&uuml;ck</a></p>

			<p>Der Eintrag wurde nicht gespeichert!</p>

		<?php

	}
  
?>