excusez-moi si je poste 15 sujets par jour mais je suis un vrai noob qui est a ses débuts.
le script suivant marche pas, mais il devrait :
<?php
foreach ($HTTP_POST_VARS as $valeur)
if ($mpasse != $mpasse2)
{echo
"<table border='0' width='35%' align='center' bgcolor='#F0F0F0' cellspacing='0'
cellpadding='0'>
<tr>
<td width='100%' align='center'><p align='center'><strong><font color='#0000FF'>Vous
n'avez pas mis les mêmes mots de passe</font></strong></td>
</tr>
</table>";
exit;
}
elseif ($clé != "occupations")
{ if ($valeur == "")
{echo "
<table border='0' width='35%' align='center' bgcolor='#F0F0F0' cellspacing='0'
cellpadding='0'>
<tr>
<td width='100%' align='center'><p align='center'><strong><font color='#0000FF'>Vous
n'avez pas rempli tous les champs du formulaire</font></strong></td>
</tr>
</table>";
exit;
}
else
{
$pseudo = strip_tags($pseudo);
$pseudo = trim($pseudo);
$e-mail = strip_tags($e-mail);
$occupations = strip_tags($occupations);
$occupations = trim($occupations);
$user="root";
$host="localhost";
$password="";
$database="inscrits";
$connexion = mysql_connect($host, $user, $password)
or die ("connexion impossible");
$db = mysql_select_db($database, $connexion)
or die ("séléction de la base impossible");
$query = "INSERT INTO membres (pseudo,mpasse,e-mail,occupations)
VALUES ('$pseudo'.'$mpasse'.'$e-mail'.'$occupations')";
echo "<table border='0' width='35%' align='center' bgcolor='#F0F0F0' cellspacing='0'
cellpadding='0'>
<tr>
<td width='100%' align='center'><p align='center'><strong><font color='#0000FF'>Vous êtes inscrit sur Alpha-hl, vos données ont bien été placéés dans notre base.</font></strong></td>
</tr>
</table>";
}
?>
l'erreur est la suivante :
Parse error: parse error, unexpected '=' in c:\program files\easyphp\www\traitement_inscription.php4 on line 32
bon voila...
merci
le script suivant marche pas, mais il devrait :
<?php
foreach ($HTTP_POST_VARS as $valeur)
if ($mpasse != $mpasse2)
{echo
"<table border='0' width='35%' align='center' bgcolor='#F0F0F0' cellspacing='0'
cellpadding='0'>
<tr>
<td width='100%' align='center'><p align='center'><strong><font color='#0000FF'>Vous
n'avez pas mis les mêmes mots de passe</font></strong></td>
</tr>
</table>";
exit;
}
elseif ($clé != "occupations")
{ if ($valeur == "")
{echo "
<table border='0' width='35%' align='center' bgcolor='#F0F0F0' cellspacing='0'
cellpadding='0'>
<tr>
<td width='100%' align='center'><p align='center'><strong><font color='#0000FF'>Vous
n'avez pas rempli tous les champs du formulaire</font></strong></td>
</tr>
</table>";
exit;
}
else
{
$pseudo = strip_tags($pseudo);
$pseudo = trim($pseudo);
$e-mail = strip_tags($e-mail);
$occupations = strip_tags($occupations);
$occupations = trim($occupations);
$user="root";
$host="localhost";
$password="";
$database="inscrits";
$connexion = mysql_connect($host, $user, $password)
or die ("connexion impossible");
$db = mysql_select_db($database, $connexion)
or die ("séléction de la base impossible");
$query = "INSERT INTO membres (pseudo,mpasse,e-mail,occupations)
VALUES ('$pseudo'.'$mpasse'.'$e-mail'.'$occupations')";
echo "<table border='0' width='35%' align='center' bgcolor='#F0F0F0' cellspacing='0'
cellpadding='0'>
<tr>
<td width='100%' align='center'><p align='center'><strong><font color='#0000FF'>Vous êtes inscrit sur Alpha-hl, vos données ont bien été placéés dans notre base.</font></strong></td>
</tr>
</table>";
}
?>
l'erreur est la suivante :
Parse error: parse error, unexpected '=' in c:\program files\easyphp\www\traitement_inscription.php4 on line 32
bon voila...
merci