Bonjour à tous.

Voila j'ai un petit problème avec Smarty. En fait lorsque je charge ma page page.php (dans laquelle il y a un $smarty->display("ficher.tpl"), mon navigateur ne charge pas la page demandée. Il retourne directement sur index.php ...

Le code source de mon .php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?
require("_generic/session.php");
if ($_SESSION["lang"]=="en")
	require('_generic/constants.inc');
elseif ($_SESSION["lang"]=="fr")
	require('_generic/constants_fr.inc');
else
	require('_generic/constants_ro.inc');
 
require('libs/Smarty.class.php');// load Smarty library
require('_generic/db_server_connection.inc'); // this generates $conn
 
 
$usFirst=$_POST["users_firstname"];
$usName=$_POST["users_name"];
$bPlace=$_POST["born_place"];
 
//...
 
$smarty = new Smarty();
 
$smarty->assign("title", ADD_USERS_TITLE);
$smarty->assign("introduction", ADD_USERS_INTRODUCTION);
$smarty->assign("errMess", $errMess);
$smarty->assign("labelFirstname",ADD_USERS_FIRSTNAME);
$smarty->assign("labelName",ADD_USERS_NAME);
$smarty->assign("labelGender",ADD_USERS_GENDER);
 
//...
 
$smarty->display("templates/users_add.tpl");
?>
Le code source du .tpl
Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
	<head>
		<script language="JavaScript" type="text/javascript" src="inscription_form.js"></script>
		<link href="_css/documents.css" rel="stylesheet" type="text/css" >
		{literal}
			<script language="javascript">
				var errorNoFirstname="{$errorNoFirstname}";
				var errorNoName="{$errorNoName}";
				var errorNoGender="{$errorNoGender}";
				var errorNoBirthdate="{$errorNoBirthdate}";
				var errorNoBornPlace="{$errorNoBornPlace}";
				var errorNoNumber="{$errorNoNumber}";
				var errorNoStreet="{$errorNoStreet}";
				var errorNoZipCode="{$errorNoZipCode}";
				var errorNoCity="{$errorNoCity}";
				var errorNoCountry="{$errorNoCountry}";
				var errorNoEmail="{$errorNoEmail}";
			</script>
		{/literal}
	</head>
 
<body>
<form method="post" id="users_add">
	<table style="font: 7pt Verdana" width="550" border="0" cellpadding="0" cellspacing="0" >
		<tr>
			<td colspan="2" class="title">{$title}</td>
		</tr>
                <tr>
			<td width="40%" align="right">{$labelFirstname}</td>
			<td width="60%"><input type="text" name="users_firstname" id="users_firstname" class="inputs" style="width:300px; height:20px" maxlength="30" value="{$usFirst}" /></TD>
		</tr>
		<tr>
			<td width="40%" align="right">{$labelDate}</td>
			<td width="60%"> 
				<select id="lst_day" name="lst_day" class="inputs" style="height:20px" size="1">
					<option value="day">{$day}</option>
				</select>
                         </td>
                  </tr>
 
//.....
 
</table>
 
	<input type="button" id="btn_send_data" value="Valider" />
	</form>
 
	<form method="POST" action="enov_home.php">
		<input type="submit" id="btn_cancel_data" value="Annuler" />
	</form>
 
</body>
</html>

Merci de votre aide.