Questionnaire avec restriction en php
Fermé
christophe.therrien
Messages postés
102
Date d'inscription
lundi 25 mai 2009
Statut
Membre
Dernière intervention
9 juin 2010
-
27 mai 2009 à 18:40
christophe.therrien Messages postés 102 Date d'inscription lundi 25 mai 2009 Statut Membre Dernière intervention 9 juin 2010 - 28 mai 2009 à 16:36
christophe.therrien Messages postés 102 Date d'inscription lundi 25 mai 2009 Statut Membre Dernière intervention 9 juin 2010 - 28 mai 2009 à 16:36
A voir également:
- Questionnaire avec restriction en php
- Restriction instagram - Guide
- Easy php - Télécharger - Divers Web & Internet
- Restriction messenger - Forum Facebook Messenger
- Php natif - Forum PHP
- Get_magic_quotes_gpc php 8 ✓ - Forum PHP
5 réponses
dodoecchi
Messages postés
454
Date d'inscription
samedi 9 septembre 2006
Statut
Membre
Dernière intervention
26 avril 2012
29
27 mai 2009 à 18:58
27 mai 2009 à 18:58
bah mon coco tu cherches sur internet des cours PHP chapitre conditions....
ou alors tu poses des questions plus ciblées
et au lieu de non balancer ton fichier en entier sans rien nous dire, dis nous plutot où il faut regarder......
Dorian
ou alors tu poses des questions plus ciblées
et au lieu de non balancer ton fichier en entier sans rien nous dire, dis nous plutot où il faut regarder......
Dorian
christophe.therrien
Messages postés
102
Date d'inscription
lundi 25 mai 2009
Statut
Membre
Dernière intervention
9 juin 2010
1
28 mai 2009 à 15:17
28 mai 2009 à 15:17
En fait mon problème c'est que mon fichier ne s'affiche pas lorsque je tente de l'ouvrir. je crois que ce sont mes restrictions (if, else) car je ne sais trop comment les intégrer dans mon fichier. de plus j'ai des restrictions à l'intérieur de d'autre restrictions (if ou else). je me demandais donc qu'elle était la bonne façon pour intégrer ces dites restrictions dans un fichier php.
Ozimandias
Messages postés
502
Date d'inscription
jeudi 14 mai 2009
Statut
Membre
Dernière intervention
10 mars 2010
46
28 mai 2009 à 16:28
28 mai 2009 à 16:28
else { $s=($_POST['a']+$_POST['c']+$_POST['e']+$_POST['g']); $t=($_POST['b']+$_POST['d']+$_POST['f']+$_POST['h']); $u=($_POST['i']+$_POST['j']+$_POST['l']); $v=($_POST['k']+$_POST['m']); $w=($_POST['s']-$_POST['u']); $x=($_POST['t']-$_POST['v']); $y=(($_POST['n']+$_POST['o']+$_POST['q']+10375)*0.15); $z=(($_POST['p']+$_POST['r']+10455)*0.2); $aa=(if $_POST['w']>76770 =$_POST['w']*0.24; elseif 38 385<$_POST['w']<=76770 =$_POST['w']*0.20; else =$_POST['w']*0.16); $bb=(if $_POST['w']>123264 =$_POST['w']*0.29;
tu oublie la moitié des acolades et des parenthèses... je souligne 1 ou 2 exemples d'oubli...
else { $s=($_POST['a']+$_POST['c']+$_POST['e']+$_POST['g']); $t=($_POST['b']+$_POST['d']+$_POST['f']+$_POST['h']); $u=($_POST['i']+$_POST['j']+$_POST['l']); $v=($_POST['k']+$_POST['m']); $w=($_POST['s']-$_POST['u']); $x=($_POST['t']-$_POST['v']); $y=(($_POST['n']+$_POST['o']+$_POST['q']+10375)*0.15); $z=(($_POST['p']+$_POST['r']+10455)*0.2); $aa=( if ( $_POST['w']>76770 =$_POST['w']*0.24; elseif 38 385<$_POST['w']<=76770 =$_POST['w']*0.20; else { =$_POST['w']*0.16); $bb=(if $_POST['w']>123264 =$_POST['w']*0.29;
christophe.therrien
Messages postés
102
Date d'inscription
lundi 25 mai 2009
Statut
Membre
Dernière intervention
9 juin 2010
1
28 mai 2009 à 16:32
28 mai 2009 à 16:32
d'accord je vais regarder
merci
merci
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
christophe.therrien
Messages postés
102
Date d'inscription
lundi 25 mai 2009
Statut
Membre
Dernière intervention
9 juin 2010
1
28 mai 2009 à 16:36
28 mai 2009 à 16:36
je crois que là c'est mieux, j'ai tout réorganiser...mais je suis pas sûr où j'ai besoin de parenthèses et d'accolade!
if($_POST['w']>76770) { $aa=($_POST['w']*0.24); echo 'Impôt sur le revenu imposable (Provincial) :'.$aa'$'; } elseif(38 385<$_POST['w']<=76770) { $aa=($_POST['w']*0.20); echo 'Impôt sur le revenu imposable (Provincial) :'.$aa'$'; } else { $aa=($_POST['w']*0.16); echo 'Impôt sur le revenu imposable (Provincial) :'.$aa'$'; } if($_POST['w']>123264) { $bb=$_POST['w']*0.29; echo 'Impôt sur le revenu imposable (Fédéral) :'.$bb'$'; } elseif(82399<$_POST['w']<=126264) { $bb=$_POST(['w']*0.26); echo 'Impôt sur le revenu imposable (Fédéral) :'.$bb'$'; } elseif(41200<$_POST['w']<=82399) { $bb=($_POST['w']*0.22); echo 'Impôt sur le revenu imposable (Fédéral) :'.$bb'$'; } else { $bb=($_POST['w']*0.15); echo 'Impôt sur le revenu imposable (Fédéral) :'.$bb'$'; } $cc=($_POST['u']*0.1); echo 'Crédits d\'impôts pour dividendes (Provincial) :'.$cc'$'; $dd=($_POST['v']*1.25*0.1333); echo 'Crédits d\'impôts pour dividendes (Fédéral) :'.$dd'$'; $ee=($_POST['aa']-$_POST['y']-$_POST['cc']); echo '______________________________________'; echo 'Impôts à payer (provincial) :'.$ee'$'; $ff=($_POST['bb']-$_POST['z']-$_POST['dd']); echo 'Impôts à payer (Fédéral) :'.$ff'$'; echo '______________________________________'; }