hello,
pour m'exercer en php je fais une petite calculette (classique)
ci joint mon bout de code (pas frapper

)
Je récupère bien qd je clic sur une image buton la variable mais qd je reclique pour concatener j'ai l'impression qu'il ne garde pas la variable. Alors comme j'ai pas de debogueur je ne peux pas voir mes variables ni avoir un mode pas à pas (snif!)
une idée ?
merci.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
/* $Operateur;
$Resultat;
$Nombre; */
/* settype($Nombre,"string") ; */
/* $Memup; */
if (isset($_POST["un_x"])){$Nombre= "1". $Nombre;}
if (isset($_POST["deux_x"])){ $Nombre="2". $Nombre ;}
if (isset($_POST["trois_x"])){ $Nombre="3". $Nombre ;}
if (isset($_POST["quatre_x"])){ $Nombre="4". $Nombre ;}
if (isset($_POST["cinq_x"])){ $Nombre="5" . $Nombre;}
if (isset($_POST["six_x"])){ $Nombre="6". $Nombre ;}
if (isset($_POST["sept_x"])){ $Nombre="7". $Nombre ;}
if (isset($_POST["huit_x"])){ $Nombre="8". $Nombre ;}
if (isset($_POST["neuf_x"])){ $Nombre="9". $Nombre ;}
if (isset($_POST["plus_x"])){ $Operateur="+" ; $Memup = $Nombre;}
/* if (isset($_POST["entree"])){$Nombre = var_dump($Nombre.$Operateur.$Memup);} */
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>calculatrice</title>
</head>
<body>
<form id="form1" method="post" >
<?php echo("Bonjour "); echo("Olivier !");?>
<table width="587" height="236" border="1">
<td><label></label>
Chiffre<td><input type="text" name="montant" id="montant" /> </td>
<td>Résultat
</td>
<td>
<?php echo "nombre : $Nombre <br> Memup : $Memup <br> Operateur : $Operateur"; ?>
</td>
<tr>
<td><input type="image" name="un" id="un" src="images/1.png" /> </td>
<td><input type="image" name="deux" id="deux" src="images/2.png" /></td>
<td><input type="image" name="trois" id="trois" src="images/3.png" /></td>
<td><input type="image" name="plus" id="plus" src="images/plus.png" /></td>
</tr>
<tr>
<td><input type="image" name="quatre" id="quatre" src="images/4.png" /></td>
<td><input type="image" name="cinq" id="cinq" src="images/5.png" /></td>
<td><input type="image" name="six" id="six" src="images/6.png" /></td>
<td><input type="image" name="entree" id="entree" src="images/entrée.png" /></td>
</tr>
<tr>
<td><input type="image" name="sept" id="sept" src="images/7.png" /></td>
<td><input type="image" name="huit" id="huit" src="images/8.png" /></td>
<td><input type="image" name="neuf" id="neuf" src="images/9.png" /></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>