
Euréka ça fonctionne sur l'index et le formulaire

Merci beaucoup
En revanche quand je tente de l’intégrer à mon traitement.php c'est la cata.
J'ai fais de deux manières :
<?php
if(!empty($_GET['valid'])){
$valid_session = $_GET['valid'];
}
else {
$valid_session = false;
}
if(!empty($_GET['pseudo'])) {
$pseudo = $_GET['pseudo'];
}
else {
$pseudo = null;
}
if($_GET['valid'] == 1){
}
else{
}
mysql_connect('localhost','root','');//connection à SQL
mysql_select_db('fantasy');//connection à la base 'Fantasy'
if($_POST['pseudo'] and $_POST['pass'] and $_POST['mail'] and $_POST['adresse'] and $_POST['cp'] and $_POST['ville']){
$pseudo=$_POST['pseudo']; //incorporation du champs pseudo dans la variable
$pass=$_POST['pass'];
$mail=$_POST['mail'];
$adresse=$_POST['adresse'];
$cp=$_POST['cp'];
$ville=$_POST['ville'];
$tel=$_POST['tel'];
//echo $pseudo; //affichage de la variable pseudo
if($_POST['modif']==1){
$pseudoinit=$_POST['pseudoinit'];
$requete="UPDATE user SET pseudo='$pseudo', pass='$pass', mail='$mail', adresse='$adresse', cp='$cp', ville='$ville', tel='$tel' where pseudo='$pseudoinit'";
//echo $requete;
}
else{
$requete="insert into user (pseudo,pass,mail,adresse,cp,ville,tel) values('$pseudo','$pass','$mail','$adresse','$cp','$ville','$tel')";
}
//echo $requete;
$result=mysql_query($requete);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Bienvenue sur la Fantasytèque</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="style/design.css" />
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table width="1024px" height="768px" cellspacing="0" cellpadding="0" border="0"><tr><td background="images/back2_01.gif" background=no-repeat width="1024" height="290" alt="" align=left valign=top ></td></tr>
<tr><td background="images/back2_02.gif" width="1024" height="394" alt="">
<!--début du menu acceuil-->
<?php
include ("menu.php");
?>
<!--fin du menu-->
<div id="corps" class=marge2><p><h3>Enregistrement effectué</h3>
<?php
echo $pseudo.'<br/>'.$pass.'<br/>'.$mail;
?>
</p>
</div>
</td></tr>
<tr><td background="images/back2_03.gif" width="1024" height="84" alt="" valign=bottom><center><p style="font-size:11px;">©2008</p></center></td></tr>
</table>
</center>
</body>
</html>
et comme ceci :
<?php
$valid_session = ;
$pseudo = ;
if(!empty($_GET['valid'])){
$valid_session = $_GET['valid'];
}
else {
$valid_session = false;
}
if(!empty($_GET['pseudo'])) {
$pseudo = $_GET['pseudo'];
}
else {
$pseudo = null;
if($_GET['valid'] == 1){
}
else{
}
mysql_connect('localhost','root','');//connection à SQL
mysql_select_db('fantasy');//connection à la base 'Fantasy'
if($_POST['pseudo'] and $_POST['pass'] and $_POST['mail'] and $_POST['adresse'] and $_POST['cp'] and $_POST['ville']){
$pseudo=$_POST['pseudo']; //incorporation du champs pseudo dans la variable
$pass=$_POST['pass'];
$mail=$_POST['mail'];
$adresse=$_POST['adresse'];
$cp=$_POST['cp'];
$ville=$_POST['ville'];
$tel=$_POST['tel'];
//echo $pseudo; //affichage de la variable pseudo
if($_POST['modif']==1){
$pseudoinit=$_POST['pseudoinit'];
$requete="UPDATE user SET pseudo='$pseudo', pass='$pass', mail='$mail', adresse='$adresse', cp='$cp', ville='$ville', tel='$tel' where pseudo='$pseudoinit'";
//echo $requete;
}
else{
$requete="insert into user (pseudo,pass,mail,adresse,cp,ville,tel) values('$pseudo','$pass','$mail','$adresse','$cp','$ville','$tel')";
}
//echo $requete;
$result=mysql_query($requete);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Bienvenue sur la Fantasytèque</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="Design" href="style/design.css" />
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<center>
<table width="1024px" height="768px" cellspacing="0" cellpadding="0" border="0"><tr><td background="images/back2_01.gif" background=no-repeat width="1024" height="290" alt="" align=left valign=top ></td></tr>
<tr><td background="images/back2_02.gif" width="1024" height="394" alt="">
<!--début du menu acceuil-->
<?php
include ("menu.php");
?>
<!--fin du menu-->
<div id="corps" class=marge2><p><h3>Enregistrement effectué</h3>
<?php
echo $pseudo.'<br/>'.$pass.'<br/>'.$mail;
?>
</p>
</div>
</td></tr>
<tr><td background="images/back2_03.gif" width="1024" height="84" alt="" valign=bottom><center><p style="font-size:11px;">©2008</p></center></td></tr>
</table>
</center>
</body>
</html>
J'ai
( ! ) Parse error: syntax error, unexpected ';' in C:\wamp\www\Fantasy\traitement.php on line 2
en erreur
Y'a vraiment un truc que je saisie pas la dedans
