Bonjour, je tente de programmer un script de téléchargement avec cookie, demandant au gens d'entrer leur mail, nom etc pour envoyer des stats selon le theme du telechargement. j'ai fait ce code:
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
43
44
45
<html>
<head>
 
<script language="javascript" type="text/javascript">
function whpopup() {
window.open('login.php','WHpopup','width=250,height=350,left=400,top=300,resizable=no,copyhistory=no,fullscreen=no,toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=no');
}
</script>
</head>
 
 
 
<?php
 
$mail = strtolower($_COOKIE["email"]);
$nom = ucfirst($_COOKIE["nom"]);
$prenom = ucfirst($_COOKIE["prenom"]);
$societe = ucfirst($_COOKIE["societe"]);
$dlt = strtolower($_COOKIE["dwdedth"]);
$url = "monsite.com"
  [b][u]if (strlen($mail)>0) //enregistré[/u][/b]
  {
  		if (ereg(strtolower($theme), $dlt))//si déja parcouru
  		{
  		header("Location: ".$url."/".$file);
  		}
  		else //ajout du thème
  		{
  		setcookie("dwdedth",$dlt.",".$theme,time()+(2*60*6à));//2heuress
  		mail($mail, "Telechargement dans ".$theme, $nom." ".$prenom." (".$mail.") de la société".$societe." a téléchargé dans le theme ".$theme." le fichier: ".$file, "From: statsdl@monsite.com");
  		}
 
  }
  else
  {
       print(<body onload=\"whpopup()\">);

  }



?>
 
</body>
</html>
J'ai une erreur:
Parse error: parse error, unexpected T_IF in /var/www/free.fr/9/0/mandatoryhomicide/dwl.php on line 21
j'appelle comme ceci:
http://mmonsite.fr/dwl.php?theme=theme1&file=fichier.zip

Je suis nouveau dans le php, si quelqu'un pouvait m'éclairer, ça serai t sympa [/url]