Je vous explique mon probleme
J'ai trois tables
Entrée
Suite
Dessert
dans chaque tables j'ai 2 champs le nom et la description
cependant dans mon petit formulaire, j'ai placé un menu déroulant comprenant entree,suite,dessert
je souhaiterai lorsque le chef cuisinier "clac" sur un de ces titres celui ci inscrit bien dans la table désiré
voici le code de ma page index
Code : Tout sélectionner
<table width="0" height="0" border="0" align="center" cellpadding="2" cellspacing="0">
<form name="enregistrement" method="get" action="joinform.php">
<tr>
<td align="right" width="250">Type de Plat</dt>
<td align="left" width="250">
<form method="get">
<select name="repas">
<option value="entree">entree</option>
<option value="suite">suite</option>
<option value="dessert">dessert</option>
</select></dt></tr>
<tr>
<td align="right" width="250">Nom Entree :</dt>
<td align="left" width="250"><span class="saisie"><input name="nomentree" type="text" size=30></span></dt>
</tr>
<tr>
<td align="right" width="250">Description de la recette : </dt>
<td align="left" width="250">
<TEXTAREA name="description" rows=10 COLS=40></TEXTAREA>
</dt>
</tr>
<tr>
<td align="right" width="250">
<td><input type="submit" name="Submit" value="Envoyer"/>
</td>
</tr>
</center>
</form></table>Code : Tout sélectionner
<?php require_once('./Connections/login.php'); ?>
<?
$msg =
"nomentree : " . $_GET['nomentree'] . "<br>"
. "description : " . $_GET['description'];
$nomentree = $_GET['nomentree'];
$description = $_GET['description'];
echo $msg;
?>
<?
$query1 = "INSERT INTO entree SET nomentree ='$nomentree', description ='$description'";
mysql_query($query1);
$entree = mysql_insert_id();
?>
<?
$msg =
"nomsuite : " . $_GET['nomsuite'] . "<br>"
. "description : " . $_GET['description'];
$nomsuite = $_GET['nomsuite'];
$description = $_GET['description'];
echo $msg;
?>
<?
$query1 = "INSERT INTO suite SET nomsuite ='$nomsuite', description ='$description'";
mysql_query($query1);
$suite = mysql_insert_id();
?>
<?
$msg =
"nomdessert : " . $_GET['nomdessert'] . "<br>"
. "description : " . $_GET['description'];
$nomdessert = $_GET['nomdessert'];
$description = $_GET['description'];
echo $msg;
?>
<?
$query1 = "INSERT INTO dessert SET nomsuite ='$nomsuite', description ='$description'";
mysql_query($query1);
$dessert = mysql_insert_id();
?>