il ya un problème dans mon code pour afficher (php)

sand285 Messages postés 6 Date d'inscription mardi 19 avril 2005 Statut Membre Dernière intervention 20 avril 2005 - 20 avril 2005 à 23:01
malalam Messages postés 10839 Date d'inscription lundi 24 février 2003 Statut Membre Dernière intervention 2 mars 2010 - 21 avril 2005 à 08:59
Salut,

J'ai un problème avec mon code ici,quand je fait une selection dans mais liste déroulante il n'affiche pas possible ou pas possible.Et je ne trouve pas mon erreur (j'ai mi tout en post)
voici mon site en cliquant sur coul rien ce passe et j'ai un base de donnée derrière
[javascript:ol('http://membres.lycos.fr/sitechinchilla/'); http://membres.lycos.fr/sitechinchilla/]

merci

<html>


<form action="coul.html" method="post">

//creation du tableaux couleur1
<SELECT name="couleur1">


<OPTION value=1>Black_velvet</OPTION>
<OPTION value=2>Harcoal</OPTION>
<OPTION value=3>Ebony</OPTION>
<OPTION value=4>Wilson</OPTION>
<OPTION value=5>Starlite</OPTION>
<OPTION value=6>Albinos</OPTION>
<OPTION value=7>Beige_tower</OPTION>
<OPTION value=8>Champagne</OPTION>
<OPTION value=9>Almond_blossoin</OPTION>
<OPTION value=10>Beige_velvet</OPTION>
<OPTION value=11>Afro_violet</OPTION>
<OPTION value=12>Pastel</OPTION>
<OPTION value=13>Saphir</OPTION>
<OPTION value=14>Saphir_velvet</OPTION>


</SELECT>;



//creation du tableaux couleur2
<SELECT name="couleur2">


<OPTION value=1>Black_velvet</OPTION>
<OPTION value=2>Harcoal</OPTION>
<OPTION value=3>Ebony</OPTION>
<OPTION value=4>Wilson</OPTION>
<OPTION value=5>Starlite</OPTION>
<OPTION value=6>Albinos</OPTION>
<OPTION value=7>Beige_tower</OPTION>
<OPTION value=8>Champagne</OPTION>
<OPTION value=9>Almond_blossoin</OPTION>
<OPTION value=10>Beige_velvet</OPTION>
<OPTION value=11>Afro_violet</OPTION>
<OPTION value=12>Pastel</OPTION>
<OPTION value=13>Saphir</OPTION>
<OPTION value=14>Saphir_velvet</OPTION>


</SELECT>;


</from>

</html>


<?php coul.php


$tab[1][1]= false ;
$tab[1][2]= true;
$tab[1][3]= true;
$tab[1][4]= true;
$tab[1][5]= true;
$tab[1][6]= true;
$tab[1][7]= true;
$tab[1][8]= true;
$tab[1][9]= true;
$tab[1][10]= true;
$tab[1][11]= true;
$tab[1][12]= true;
$tab[1][13]= true;
$tab[1][14]=false ;



$tab[2][1]= true;
$tab[2][2]= true;
$tab[2][3]= true;
$tab[2][4]= true;
$tab[2][5]= true;
$tab[2][6]= true;
$tab[2][7]= true;
$tab[2][8]= true;
$tab[2][9]= true;
$tab[2][10]= true;
$tab[2][11]= true;
$tab[2][12]= true;
$tab[2][13]= true;
$tab[2][14]= true;

if ($tab[$_POST['couleur1']][$_POST['couleur2']] == true)
echo "Tr&egrave;s beau ramp;eacute;sultat";
else
echo "Ramp;eacute;sultat impossible";





}


?>

Sand

2 réponses

mightteam Messages postés 143 Date d'inscription lundi 1 septembre 2003 Statut Membre Dernière intervention 2 juin 2008
20 avril 2005 à 23:29
salut

déjà un prob sur ton site

quand je clique sur coul , que je choisi 2 couleur et que je regarde le lien de la page il m'indique les couleur dans l'URL c'est que ton post est pas bon

mais ca sa viens surement du faits que tu ai mis dans ton code methode à la place de method

J'espere avoir pu t'aider

Msn & Mail : Bruno@Pages-Concept.be
0
malalam Messages postés 10839 Date d'inscription lundi 24 février 2003 Statut Membre Dernière intervention 2 mars 2010 25
21 avril 2005 à 08:59
Hello,



enfin re...



dis, tu le traites ton formulaire ?

Il y a un bouton submit ? Et tu testes ce bouton ? Puis tu testes tes $_POST ?
0
Rejoignez-nous