Bonjour,
Une question toute simple désolé je n'ai pas fait de recherche car étant en déplacement je me connecte par le biais d'un hub public et je paie la connexion au temps.
De ce fait je repasserai voir plutard si vous avez une solution à ma question ou des conseils à me prodiguer.
Suite à une première page ou l'internaute fait un choix je récupère une valeur par
le biais d'un POST;
ensuite sur une page de traitement je voudrais renvoyer l'internaute sur la page correspondant à sont choix directement
et de facon transparente.
Voici ma première page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>novi-case</title>
</head>
<body>
<table width="100%" border="0">
<tr>
<td width="200" rowspan="2" align="center" valign="top"><?php include "gauche.php" ?></td>
<td valign="top"><?php include "haut_nc.php" ?></td>
<td width="59" rowspan="2" align="right" valign="top"><?php include "droite.php" ?></td>
</tr>
<tr>
<td valign="top" align="center">
<table border="0" width="600" id="table1" cellspacing="0" cellpadding="0">
<tr>
<td height="75">
<p align="center"><font face="Berlin Sans FB" size="5" color="#FF0000">
Calcul des besoins pour votre toiture</font></td>
</tr>
<tr>
<td height="50">
<form method="POST" action="renvoie_choix.php">
<table border="1" width="100%" id="table2" bordercolordark="#BDD614" bordercolorlight="#CCFF99">
<tr>
<td width="326">
<p align="right"><font face="Berlin Sans FB" size="4">1 pan
</font></td>
<td>
<input type="radio" value="1" checked name="choix"></td>
</tr>
<tr>
<td height="24" width="326">
<p align="right"><font face="Berlin Sans FB" size="4">2 pans
identiques
</font></td>
<td height="24">
<input type="radio" name="choix" value="2"></td>
</tr>
<tr>
<td width="326">
<p align="right"><font face="Berlin Sans FB" size="4">2 pans
de tailles différentes
</font></td>
<td> <input type="radio" name="choix" value="3">
</td>
</tr>
</table>
<p align="center"><input type="submit" value="Envoyer" name="B1">
<input type="reset" value="Rétablir" name="B2"></p>
</form>
</td>
</tr>
</table>
</body>
</html>
Et voici la seconde :
<?php
$choix = $_POST['choix'];
if ($choix==1) $calcul = '1_pan.php';
if ($choix==2) $calcul = '2_pans.php';
if ($choix==3) $calcul = '2_pans_dif.php';
header ('location = $calcul');
?>
mon problème est que je n'arrive pas à integrer le mon URL dans la fonction header.
Existe t'il une solution plus simple pour éviter une page de traitement ou alors de quel manière faire passer
ma variable dans le header.
Merci de votre aide
Maxou