par
jojo » 10 mai 2005, 08:32
Il y avait des erreur comme vous l'avez citer j'ai tout coriger d'aprai le chargemen de la page l'image est prise en compt par le formulaire mais reste toujour introuvable dans data
Le code du formulaire (inscription.php)
<body background="design/fond.png">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" id="AutoNumber1" width="336">
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/h.PNG">
<p align="center"><font face="Comic Sans MS" color="#000080"><b>Inscription</b></font></td>
</tr>
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/pagefond.gif">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-width:0; border-collapse: collapse" bordercolor="#111111" width="266" id="AutoNumber2">
<tr>
<td width="113" style="border-style: none; border-width: medium">Pseudo</td>
<td width="165" style="border-style: none; border-width: medium">
<form enctype="multipart/form-data" action="index.php?pagea=web/verif.php" method="POST">
<input type="text" name="pseudo" size="22"></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">Petit message</td>
<td width="165" style="border-style: none; border-width: medium">
<textarea rows="4" name="profil" cols="18">age
ville
com</textarea></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">Mots de passe</td>
<td width="165" style="border-style: none; border-width: medium">
<input type="text" name="mdp" size="22"></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">Email</td>
<td width="165" style="border-style: none; border-width: medium">
<input type="text" name="email" size="22"></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">sexe</td>
<td width="165" style="border-style: none; border-width: medium">
<select size="1" name="sexe">
<option value="fille">fille</option>
<option value="garcon">garcon</option>
</select><input type="hidden" name="MAX_FILE_SIZE" value="20000"/></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">
Avatar </td>
<td width="165" style="border-style: none; border-width: medium">
<input type="file" name="avatar" size="8"></td>
</tr>
<tr>
<td width="279" colspan="2" style="border-style: none; border-width: medium">
<p align="center"><input type="submit" value="inscription"/></form></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/b.PNG"> </td>
</tr>
</table>
<p> </p>
</body>
(je n'est que mie la balise body)
et le code de verif.php
<body background="design/fond.png">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" id="AutoNumber1" width="336">
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/h.PNG">
<p align="center"><font face="Comic Sans MS" color="#000080"><b>Validation inscription</b></font></td>
</tr>
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/pagefond.gif">
<p align="center">
<?
if($_FILES['avatar']['size'] = 0 and $_FILES['avatar']['size'] = null)
{
echo 'chargement de l\'avatar echouer verifier la t\'aille du fichier. Elle doit etre inferieure a 20Ko</br>';
}
else
{
$destination = 'data/'.$_POST['pseudo'].'.jpg';
$temp_file = $_FILES['avatar']['tmp_name'];
move_uploaded_file($temp_file,$destination);
}
if(isset($_POST['pseudo']) and isset($_POST['email']) and isset($_POST['profil']) and isset($_POST['sexe']) and isset($_POST['mdp']))
{
if($_POST['pseudo'] != null and $_POST['email'] != null and $_POST['profil'] != null and $_POST['sexe'] != null and $_POST['mdp'] != null)
{
$pseudo = $_POST['pseudo'];
$email = $_POST['email'];
$profil = $_POST['profil'];
$sexe = $_POST['sexe'];
$mdp = $_POST['mdp'];
if(isset($destination)){$avatar = $destination;}else{$avatar="data/defau.jpg'";}
?>
Votre pseudo: <?echo $pseudo;?><br>
Votre email: <?echo $email;?></br>
Votre Profil: <?echo $profil;?></br>
Votre sexe: <?echo $sexe;?>
<?
mysql_connect("***","***");
mysql_select_db("aafgtn_db");
$rep=mysql_query("INSERT INTO membre VALUES('','".$pseudo."','".$email."','".$profil."','".$sexe."','".$mdp."','".$avatar."')");
mysql_close();
if($rep)
{
echo 'Merci'.$_POST['pseudo'].' de votre inscription (réussite)';
}
else
{
echo 'Erreur réinscrivez vous';
}
}
else
{
echo 'Remplisser tout les champs';
}
}
else
{
echo ' ERREUR';
}
?>
</td>
</tr>
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/b.PNG"> </td>
</tr>
</table>
<p> </p>
</body>
Voila, Encore merci pour vos 1er aide qui mon canmeme fait avancer

Il y avait des erreur comme vous l'avez citer j'ai tout coriger d'aprai le chargemen de la page l'image est prise en compt par le formulaire mais reste toujour introuvable dans data
Le code du formulaire (inscription.php)
[php]<body background="design/fond.png">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" id="AutoNumber1" width="336">
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/h.PNG">
<p align="center"><font face="Comic Sans MS" color="#000080"><b>Inscription</b></font></td>
</tr>
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/pagefond.gif">
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" style="border-width:0; border-collapse: collapse" bordercolor="#111111" width="266" id="AutoNumber2">
<tr>
<td width="113" style="border-style: none; border-width: medium">Pseudo</td>
<td width="165" style="border-style: none; border-width: medium">
<form enctype="multipart/form-data" action="index.php?pagea=web/verif.php" method="POST">
<input type="text" name="pseudo" size="22"></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">Petit message</td>
<td width="165" style="border-style: none; border-width: medium">
<textarea rows="4" name="profil" cols="18">age
ville
com</textarea></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">Mots de passe</td>
<td width="165" style="border-style: none; border-width: medium">
<input type="text" name="mdp" size="22"></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">Email</td>
<td width="165" style="border-style: none; border-width: medium">
<input type="text" name="email" size="22"></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">sexe</td>
<td width="165" style="border-style: none; border-width: medium">
<select size="1" name="sexe">
<option value="fille">fille</option>
<option value="garcon">garcon</option>
</select><input type="hidden" name="MAX_FILE_SIZE" value="20000"/></td>
</tr>
<tr>
<td width="113" style="border-style: none; border-width: medium">
Avatar </td>
<td width="165" style="border-style: none; border-width: medium">
<input type="file" name="avatar" size="8"></td>
</tr>
<tr>
<td width="279" colspan="2" style="border-style: none; border-width: medium">
<p align="center"><input type="submit" value="inscription"/></form></td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/b.PNG"> </td>
</tr>
</table>
<p> </p>
</body>
[/php]
(je n'est que mie la balise body)
et le code de verif.php
[php]
<body background="design/fond.png">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-width: 0" bordercolor="#111111" id="AutoNumber1" width="336">
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/h.PNG">
<p align="center"><font face="Comic Sans MS" color="#000080"><b>Validation inscription</b></font></td>
</tr>
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/pagefond.gif">
<p align="center">
<?
if($_FILES['avatar']['size'] = 0 and $_FILES['avatar']['size'] = null)
{
echo 'chargement de l\'avatar echouer verifier la t\'aille du fichier. Elle doit etre inferieure a 20Ko</br>';
}
else
{
$destination = 'data/'.$_POST['pseudo'].'.jpg';
$temp_file = $_FILES['avatar']['tmp_name'];
move_uploaded_file($temp_file,$destination);
}
if(isset($_POST['pseudo']) and isset($_POST['email']) and isset($_POST['profil']) and isset($_POST['sexe']) and isset($_POST['mdp']))
{
if($_POST['pseudo'] != null and $_POST['email'] != null and $_POST['profil'] != null and $_POST['sexe'] != null and $_POST['mdp'] != null)
{
$pseudo = $_POST['pseudo'];
$email = $_POST['email'];
$profil = $_POST['profil'];
$sexe = $_POST['sexe'];
$mdp = $_POST['mdp'];
if(isset($destination)){$avatar = $destination;}else{$avatar="data/defau.jpg'";}
?>
Votre pseudo: <?echo $pseudo;?><br>
Votre email: <?echo $email;?></br>
Votre Profil: <?echo $profil;?></br>
Votre sexe: <?echo $sexe;?>
<?
mysql_connect("***","***");
mysql_select_db("aafgtn_db");
$rep=mysql_query("INSERT INTO membre VALUES('','".$pseudo."','".$email."','".$profil."','".$sexe."','".$mdp."','".$avatar."')");
mysql_close();
if($rep)
{
echo 'Merci'.$_POST['pseudo'].' de votre inscription (réussite)';
}
else
{
echo 'Erreur réinscrivez vous';
}
}
else
{
echo 'Remplisser tout les champs';
}
}
else
{
echo ' ERREUR';
}
?>
</td>
</tr>
<tr>
<td width="336" style="border-style: none; border-width: medium" background="design/b.PNG"> </td>
</tr>
</table>
<p> </p>
</body>[/php]
Voila, Encore merci pour vos 1er aide qui mon canmeme fait avancer :P