voila je bloque sur les sessions. je voudrais faire passer des variables entre différentes pages. Voila mon système de page:
-1 je vais sur la page mecontacter.htm
dans cette page un script php (anitspamimg.php) qui génère une image est appelé dont voila le code. seul le début est important....
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
<?php
session_start();
$string = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
 $chaine = '';
 for( $i = 0; $i < 5; $i++ ){
 $tab[$i] = $string[ mt_rand( 0, 35 ) ];
 $chaine .= $tab[$i] ;
 }
$_SESSION['verif'] = $chaine;
header ("Content-type: image/png");
$image = @Imagecreate (500 , 150);
$couleur = ImageColorAllocate($image,0 ,0 ,0 );
$couleur1 = ImageColorAllocate ($image, mt_rand(1, 255), mt_rand(1, 255), mt_rand(1, 255));
$couleur2 = ImageColorAllocate ($image, mt_rand(1, 255), mt_rand(1, 255), mt_rand(1, 255));
$couleur3 = ImageColorAllocate ($image, mt_rand(1, 255), mt_rand(1, 255), mt_rand(1, 255));
$couleur4 = ImageColorAllocate ($image, mt_rand(1, 255), mt_rand(1, 255), mt_rand(1, 255));
$couleur5 = ImageColorAllocate ($image, mt_rand(1, 255), mt_rand(1, 255), mt_rand(1, 255));
ImageTTFText($image,mt_rand(15, 30),mt_rand(-30, 30),(150+6*5),80, $couleur1,"newsflashbb.ttf","$tab[0]");
ImageTTFText($image,mt_rand(15, 30),mt_rand(-30, 30),(150+10*6),80, $couleur2,"newsflashbb.ttf","$tab[1]");
ImageTTFText($image,mt_rand(15, 30),mt_rand(-30, 30),(150+15*7),80, $couleur3,"newsflashbb.ttf","$tab[2]");
ImageTTFText($image,mt_rand(15, 30),mt_rand(-30, 30),(150+20*8),80, $couleur4,"newsflashbb.ttf","$tab[3]");
ImageTTFText($image,mt_rand(15, 30),mt_rand(-30, 30),(150+25*9),80, $couleur5,"newsflashbb.ttf","$tab[4]");
ImageColorTransparent($image, $couleur); 
ImagePng ($image);
?>
je souhaite ensuite récupérer la variable $chaine sur une autre page "message.php", mais un message d'erreur apparait
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\program files\easyphp1-8\www\projet\message.php on line 13
voila le code de message.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
<?php
session_start();
$liendb = mysql_connect("localhost", "root","");
mysql_select_db("form");
$prenom = $_POST['prenom'];
$nom = $_POST['nom'];
$email = $_POST['email'];
$message = $_POST['message'];
$sql = "INSERT INTO inscription (prenom, nom, email, message) VALUES ('$prenom' , '$nom', '$email', '$message')";
mysql_query($sql);
mysql_close($liendb);
echo "$nom";
echo "$_SESSION['verif']";
?>
voila, mon problème, si quelqu'un avait le gentillesse de m'aider...