Salut!
J'ai un petit souci avec un redirection..
Voici mon code :
Quand le script se lance la page essai de se charger indéfiniment...
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
33
34
35
36
37
38
39
40
41
42 <? /* Include Files *********************/ include("database.php"); $visited ='0'; $username =$_SESSION['username']; /*check if one of the pages has been visited..? */ global $conn; $q = "select visited from e_services_qce_user where user = '$username'"; $result = mysql_query($q,$conn); $dbarray = mysql_fetch_array($result); $dbarray['visited'] = stripslashes($dbarray['visited']); $visited = $dbarray['visited']; echo $visited; ?> <script language="javascript"> if(<?php echo $visited; ?> == '1') { window.location.replace('Form1.php'); } else { if(<?php echo $visited; ?> == '2') { window.location.replace('Form2.php'); } else { if(<?php echo $visited; ?> == '3') { window.location.replace('Form3.php'); } else { if(<?php echo $visited; ?> == '4') { window.location.replace('Form4.php'); } } } } </script>
Je ne vois pas ce qui ne va pas..
Merci
Partager