A voir également:
- Enregistrer les donnéés
- Enregistrer video youtube - Guide
- Enregistrer son ecran - Guide
- Audacity enregistrer son pc - Guide
- Enregistrer musique youtube - Guide
- Enregistrer video facebook - Guide
2 réponses
periplasme
Messages postés
391
Date d'inscription
vendredi 22 avril 2011
Statut
Membre
Dernière intervention
5 février 2013
53
19 août 2011 à 07:25
19 août 2011 à 07:25
commence par montrer ton code ...
mon code :
<html>
<head>
<title>Annonce</title>
</head>
<body>
<h3>Annonce</h3>
<form method="post">
<fieldset><legend>Postuler votre annonce</legend><br />
<label for="Titre"><strong></strong> Titre :</label>
<input name="Titre" type ="text"id="Titre" /> <br /><br />
<label for="Catégorie"><strong></strong> Catégorie :</label>
<select type ="text" name="Catégorie" id="Catégorie" />
<option value="Catégorie" selected="Catégorie"></option>
<option value="informatique">informatique</option
<option value="Services_aux_entreprises">Services aux entreprises</option>
</select><br/><br/>
<label for="Nombre_poste"><strong></strong> Nombre de poste :</label>
<input name="Nombre_poste" type ="text"id="Nombre de poste" /> <br /><br /
<label for="Ville"><strong></strong> Ville :</label>
<input name="Ville" type ="text"id="Ville" /> <br /><br />
<label for="Société"><strong></strong> Société :</label><br />
<textarea cols=50 rows=5 name="Société" id="Poste"> Décrire un peu votre société...</textarea><br /><br />
<label for="Poste"><strong></strong> Poste :</label><br />
<textarea cols=50 rows=5 name="Poste" id="Poste"> Parlez de votre annonce...</textarea><br /><br />
<label for="Profil"><strong></strong> Profil :</label><br />
<textarea cols=50 rows=5 name="Profil" id="Profil"> décrire le profil demmandé..... </textarea><br /><br />
<label for="Délai"><strong></strong> Délai:</label>
<input name="Délai" type ="text"id="Délai" /> <br /><br />
<label for="Type_contact"><strong></strong> Type de contact :</label><br />
<textarea cols=50 rows=5 name="Type_contact" id="Type de contact"> donner votre adresse email ou votre adresse..... </textarea ><br /><br />
<input type="submit" name="Envoyer" value="Envoyer"></p>
</fieldset>
</form>
<?php
if (isset ($_POST['Envoyer']))
{
$i = 0;
if (isset($_POST['Titre']))
{
if (strlen($_POST['Titre']) == null)
{
$titre_erreur = "Vous avez oublié le titre.";
$i++;
}
}
if (isset($_POST['Catégorie']))
{
if (strlen($_POST['Catégorie']) == null)
{
$catégorie_erreur = "Vous avez oublié de précisés la categorie.";
$i++;
}
}
if (isset($_POST['Nombre_poste']))
{
if (strlen($_POST['Nombre_poste']) == null)
{
$nombre_poste_erreur = "Vous avez oublié de préciser le nombre de poste.";
$i++;
}
}
if (isset($_POST['Ville']))
{
if (strlen($_POST['Ville']) == null)
{
$ville_erreur = "Vous avez oublié de précisés la Ville.";
$i++;
}
}
if (isset($_POST['Société']))
{
if (strlen($_POST['Société']) == null)
{
$société_erreur = "Vous avez oublié décrire votre société.";
$i++;
}
}
if (isset($_POST['Poste']))
{
if (strlen($_POST['Poste']) == null)
{
$poste_erreur = "Vous avez oublié décrire le poste.";
$i++;
}
}
if (isset($_POST['Profil']))
{
if (strlen($_POST['Profil']) == null)
{
$profil_erreur = "Vous avez oublié de précisés le profil.";
$i++;
}
}
if (isset($_POST['Délai']))
{
if (strlen($_POST['Délai']) == null)
{
$délai_erreur = "Vous avez oublié de précisés délai de votre annonce.";
$i++;
}
}
if (isset($_POST['Type_contact']))
{
if (strlen($_POST['Type_contact']) == null)
{
$type_contact_erreur = "Vous avez oublié de préciser votre email ou votre adresse.";
$i++;
}
}
if ($i == 0) // Si $i est vide, c'est qu'il n'y a pas d'erreur
{
echo " Vous avez envoyé l'annonce ";
include "connection.php";
mysql_query("INSERT INTO annonce VALUES('', '" . $_POST['Titre'] . "' , '" . $_POST['Catégorie'] . "' ,'" . $_POST['Nombre_poste'] . "','" . $_POST['Ville'] . "','" . $_POST['Société'] . "','" . $_POST['Poste'] . "','" . $_POST['Profil'] . "','" . $_POST['Délai'] . "','" . $_POST['Type_contact'] . "','". time() ."')");
}
else
{
echo 'Envoie interrompue';
if(isset($titre_erreur)){
echo $titre_erreur ;}
if(isset($catégorie_erreur)){
echo $catégorie_erreur ;}
if(isset($Nombre_poste_erreur)){
echo $Nombre_poste_erreur ;}
if(isset($ville_erreur)){
echo $ville_erreur ;}
if(isset($société_erreur)){
echo $société_erreur ;}
if(isset($poste_erreur)){
echo $poste_erreur ;}
if(isset($profil_erreur)){
echo $profil_erreur ;}
if(isset($délai_erreur)){
echo $délai_erreur ;}
if(isset($type_contact_erreur)){
echo $type_contact_erreur ;}
}
}
?>
</body>
</html>
<html>
<head>
<title>Annonce</title>
</head>
<body>
<h3>Annonce</h3>
<form method="post">
<fieldset><legend>Postuler votre annonce</legend><br />
<label for="Titre"><strong></strong> Titre :</label>
<input name="Titre" type ="text"id="Titre" /> <br /><br />
<label for="Catégorie"><strong></strong> Catégorie :</label>
<select type ="text" name="Catégorie" id="Catégorie" />
<option value="Catégorie" selected="Catégorie"></option>
<option value="informatique">informatique</option
<option value="Services_aux_entreprises">Services aux entreprises</option>
</select><br/><br/>
<label for="Nombre_poste"><strong></strong> Nombre de poste :</label>
<input name="Nombre_poste" type ="text"id="Nombre de poste" /> <br /><br /
<label for="Ville"><strong></strong> Ville :</label>
<input name="Ville" type ="text"id="Ville" /> <br /><br />
<label for="Société"><strong></strong> Société :</label><br />
<textarea cols=50 rows=5 name="Société" id="Poste"> Décrire un peu votre société...</textarea><br /><br />
<label for="Poste"><strong></strong> Poste :</label><br />
<textarea cols=50 rows=5 name="Poste" id="Poste"> Parlez de votre annonce...</textarea><br /><br />
<label for="Profil"><strong></strong> Profil :</label><br />
<textarea cols=50 rows=5 name="Profil" id="Profil"> décrire le profil demmandé..... </textarea><br /><br />
<label for="Délai"><strong></strong> Délai:</label>
<input name="Délai" type ="text"id="Délai" /> <br /><br />
<label for="Type_contact"><strong></strong> Type de contact :</label><br />
<textarea cols=50 rows=5 name="Type_contact" id="Type de contact"> donner votre adresse email ou votre adresse..... </textarea ><br /><br />
<input type="submit" name="Envoyer" value="Envoyer"></p>
</fieldset>
</form>
<?php
if (isset ($_POST['Envoyer']))
{
$i = 0;
if (isset($_POST['Titre']))
{
if (strlen($_POST['Titre']) == null)
{
$titre_erreur = "Vous avez oublié le titre.";
$i++;
}
}
if (isset($_POST['Catégorie']))
{
if (strlen($_POST['Catégorie']) == null)
{
$catégorie_erreur = "Vous avez oublié de précisés la categorie.";
$i++;
}
}
if (isset($_POST['Nombre_poste']))
{
if (strlen($_POST['Nombre_poste']) == null)
{
$nombre_poste_erreur = "Vous avez oublié de préciser le nombre de poste.";
$i++;
}
}
if (isset($_POST['Ville']))
{
if (strlen($_POST['Ville']) == null)
{
$ville_erreur = "Vous avez oublié de précisés la Ville.";
$i++;
}
}
if (isset($_POST['Société']))
{
if (strlen($_POST['Société']) == null)
{
$société_erreur = "Vous avez oublié décrire votre société.";
$i++;
}
}
if (isset($_POST['Poste']))
{
if (strlen($_POST['Poste']) == null)
{
$poste_erreur = "Vous avez oublié décrire le poste.";
$i++;
}
}
if (isset($_POST['Profil']))
{
if (strlen($_POST['Profil']) == null)
{
$profil_erreur = "Vous avez oublié de précisés le profil.";
$i++;
}
}
if (isset($_POST['Délai']))
{
if (strlen($_POST['Délai']) == null)
{
$délai_erreur = "Vous avez oublié de précisés délai de votre annonce.";
$i++;
}
}
if (isset($_POST['Type_contact']))
{
if (strlen($_POST['Type_contact']) == null)
{
$type_contact_erreur = "Vous avez oublié de préciser votre email ou votre adresse.";
$i++;
}
}
if ($i == 0) // Si $i est vide, c'est qu'il n'y a pas d'erreur
{
echo " Vous avez envoyé l'annonce ";
include "connection.php";
mysql_query("INSERT INTO annonce VALUES('', '" . $_POST['Titre'] . "' , '" . $_POST['Catégorie'] . "' ,'" . $_POST['Nombre_poste'] . "','" . $_POST['Ville'] . "','" . $_POST['Société'] . "','" . $_POST['Poste'] . "','" . $_POST['Profil'] . "','" . $_POST['Délai'] . "','" . $_POST['Type_contact'] . "','". time() ."')");
}
else
{
echo 'Envoie interrompue';
if(isset($titre_erreur)){
echo $titre_erreur ;}
if(isset($catégorie_erreur)){
echo $catégorie_erreur ;}
if(isset($Nombre_poste_erreur)){
echo $Nombre_poste_erreur ;}
if(isset($ville_erreur)){
echo $ville_erreur ;}
if(isset($société_erreur)){
echo $société_erreur ;}
if(isset($poste_erreur)){
echo $poste_erreur ;}
if(isset($profil_erreur)){
echo $profil_erreur ;}
if(isset($délai_erreur)){
echo $délai_erreur ;}
if(isset($type_contact_erreur)){
echo $type_contact_erreur ;}
}
}
?>
</body>
</html>