bmouyam
Messages postés2Date d'inscriptionlundi 8 décembre 2003StatutMembreDernière intervention28 juillet 2004
-
28 juil. 2004 à 11:16
coockiesch
Messages postés2268Date d'inscriptionmercredi 27 novembre 2002StatutMembreDernière intervention13 septembre 2013
-
28 juil. 2004 à 12:58
Salut à tous, Php fonctionne bien dans ma machine mais le problème est le suivant:
J'ai deux fichiers, lorsque le premier s'exécute il doit enregistrer certaines valeurs dans les variables pour que le second fichier les utilise.
voici le code de 1-4.php
<HTML>
<HEAD>
<TITLE>Listing 1.4</TITLE>
</HEAD>
<FORM ACTION="1-5.php" METHOD="post">
Your Name:
</form>YourName">
Cost of a Lunch:
Days Buying Lunch:
</FORM>
</HTML>
voici le code de 1-5.php
<?
$Today = date("l F d, Y");
?>
<HTML>
<HEAD>
<TITLE>Listing 1.5</TITLE>
</HEAD>
/*
** print message about lunch cost
*/
print("$YourName, you will be out ");
print($CostOfLunch * $DaysBuyingLunch);
print(" dollars this week.
\n");
?>
</HTML>
mais lorsque j'exécute 1-4.php il fait appel à 1-5.php, et voici ce qui apparait:
Today's Date:
Wednesday July 28, 2004
, you will be out 0 dollars this week.
PHP Notice: Undefined variable: YourName in G:\apachempw32\php\1-5.php on line 19 PHP Notice: Undefined variable: CostOfLunch in G:\apachempw32\php\1-5.php on line 20 PHP Notice: Undefined variable: DaysBuyingLunch in G:\apachempw32\php\1-5.php on line 20
PS: si qlq'un sait comment resoudre ce problème, ça me déguggerait.