A voir également:
- Probleme affichage
- Affichage double ecran - Guide
- Problème affichage fenêtre windows 10 - Guide
- Problème affichage page internet google chrome ✓ - Forum Google Chrome
- Windows 11 affichage classique - Guide
- Problème d'affichage/bugs graphiques sur Chrome sur Android - Forum Téléphones & tablettes Android
5 réponses
Ca fait deja deux fois que tu postes ce message. Tu as eu une reponse et il semble que tu ne l'aies pas vue... Mets le code que tu executes et qui ne marche pas, c'est plus simple pour nous de le corriger en ligne.
http://www.commentcamarche.net/forum/affich-1261684-php
http://www.commentcamarche.net/forum/affich-1261684-php
slt
excuse moi
slt
alors alex ten di quoi?
<html>
<body>
<?
include("inc_functionTraitement.php");
$maConnexion=connexion();
if ($maConnexion !=0)
{
$requete = "select * from ets_5000";
$resultat=mysql_db_query("importer", $requete, $maConnexion) or die ("echo <b>Erreur : </b>".mysql_error($maConnexion));
echo " Selectionner une entreprise : ";
echo "<form name='frm5000' action=''>";
echo "<select name ='Nom'>";
while ($ligne=mysql_fetch_array($resultat))
{
echo "<option value='".$ligne['Nom']."'>".$ligne['Nom'];
}
echo "</select>";
echo "<input type='submit'value='ok'>";
echo "</form>";
//-------------------trier les entreprise-------------------------
//----------afficher les films----------------------------
if ($Nom<>'')
$requete= "SELECT `Nom`,`Adresse`,`CP`,`Ville`,`Telephone`,`Fax`,`Sexe`,`Admin`,`Position` FROM `ets_5000` WHERE`Nom`= '$Nom' ";
$resultat=mysql_db_query("importer", $requete, $maConnexion) or die ("echo <b>Erreur : </b>".mysql_error($maConnexion));
//affichage de l' ents
if ($row=mysql_fetch_array($resultat));
echo "<form name='frm5000' action='enregistrementEts.php'>";
echo "<font size='+5' color='blue'>".$row['Nom']."</font><br><br>";
echo "<b>Adresse : </b>".$row['Adresse']."<br><br>";
echo "<b>Code postal : </b>".$row['C.P.']."<br><br>";
echo "<b>Ville: </b>".$row['Ville']."<br><br>";
echo "<b>Telephone : </b>".$row['Telephone']."<br><br>";
echo "<b>Fax : </b>".$row['Fax']."<br><br>";
echo "<b>Sexe : </b>".$row['Sexe']."<br><br>";
echo "<b>Premier Contact : </b>".$row['Admin']."<br><br>";
echo "<b>Fonction : </b>".$row['Position']."<br><br>";
echo "<hr size='3' width='90%'><br><br>";
echo $variable=$post['Nom'];
echo "</form>";
}
else
echo "Echec de connexion";
/*<? print("<input type=\"text\" name=\"$Nom\" size=\"40\">") ; ?>*/
?>
<p align="right"><em><strong></strong></em></p>
<form name="form1" method="post" action="enregistrementEts.php">
<tr>
<tr> </tr>
<div align="center">
<a href="plusieursC.php"><font color="#6699CC">Autre contact ?</FONT></a></div>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td>Nom :<input name="Contact1" type="text" size="40"></td>
<td>Fonction :<input name="Position1" type="text" size="40"></td>
</tr>
<tr>
<td>Telephone :<input name="Telephone1" type="text" size="40"></td>
<td>Port : <input name="Port1" type="text" size="40"></td>
</tr>
<tr>
<td>E-mail :<input name="EMail1" type="text" size="40"></td>
<td>Sexe :<input name="Sexe1" type="text" size="40"></td>
</tr>
</table>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td>Nom:<input name="Contact2" type="text" size="40"></td>
<td>Fonction:<input name="Position2" type="text" size="40"></td>
</tr>
<tr>
<td>Telephone:<input name="Telephone2" type="text" size="40"></td>
<td>Port : <input name="Port2" type="text" size="40"></td>
</tr>
<tr>
<td>E-mail :<input name="EMail2" type="text" size="40"></td>
<td>Sexe :<input name="Sexe2" type="text" size="40"></td>
</tr>
</table>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td>Nom:<input name="Contact3" type="text" size="40"></td>
<td>Fonction:<input name="Position3" type="text" size="40"></td>
</tr>
<tr>
<td>Telephone:<input name="Telephone3" type="text" size="40"></td>
<td>Port : <input name="Port3" type="text" size="40"></td>
</tr>
<tr>
<td>E-mail :<input name="EMail3" type="text" size="40"></td>
<td>Sexe :<input name="Sexe3" type="text" size="40"></td>
</tr>
</table>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td><p>Commentaire:</p>
<p>
<textarea name="Commentaire" cols="78"rows="4"></textarea>
</p>
</td>
</tr>
</table>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td>Date de relance :<input name="jour" type="text" value="" size="4">
<select name="mois" size="1">
<option>Janvier</option>
<option>Fevrier</option>
<option>Mars</option>
<option>Avril</option>
<option>Mai</option>
<option>Juin</option>
<option>Juillet</option>
<option>Août</option>
<option>Septembre</option>
<option>Octobre</option>
<option>Novembre</option>
<option>Décembre</option>
</select>
<input type="text" name="annee" size="10" maxlength='4' value="2005">
</tr>
</table>
<p align="center"><input type="submit" value="Envoyer" name="B1">
<input type="reset" value="Rétablir" name="B2"></p>
<!-------------------- affichage message ------------------>
<?
if($erreur=="nomenregistrement")
{
echo"<font color ='red'>Nom enregistré</font>";
}
if($erreur=="enregistrement")
{
echo"<font color ='green'>$Nom enregistré</font>";
}
?>
<body>
<?
include("inc_functionTraitement.php");
$maConnexion=connexion();
if ($maConnexion !=0)
{
$requete = "select * from ets_5000";
$resultat=mysql_db_query("importer", $requete, $maConnexion) or die ("echo <b>Erreur : </b>".mysql_error($maConnexion));
echo " Selectionner une entreprise : ";
echo "<form name='frm5000' action=''>";
echo "<select name ='Nom'>";
while ($ligne=mysql_fetch_array($resultat))
{
echo "<option value='".$ligne['Nom']."'>".$ligne['Nom'];
}
echo "</select>";
echo "<input type='submit'value='ok'>";
echo "</form>";
//-------------------trier les entreprise-------------------------
//----------afficher les films----------------------------
if ($Nom<>'')
$requete= "SELECT `Nom`,`Adresse`,`CP`,`Ville`,`Telephone`,`Fax`,`Sexe`,`Admin`,`Position` FROM `ets_5000` WHERE`Nom`= '$Nom' ";
$resultat=mysql_db_query("importer", $requete, $maConnexion) or die ("echo <b>Erreur : </b>".mysql_error($maConnexion));
//affichage de l' ents
if ($row=mysql_fetch_array($resultat));
echo "<form name='frm5000' action='enregistrementEts.php'>";
echo "<font size='+5' color='blue'>".$row['Nom']."</font><br><br>";
echo "<b>Adresse : </b>".$row['Adresse']."<br><br>";
echo "<b>Code postal : </b>".$row['C.P.']."<br><br>";
echo "<b>Ville: </b>".$row['Ville']."<br><br>";
echo "<b>Telephone : </b>".$row['Telephone']."<br><br>";
echo "<b>Fax : </b>".$row['Fax']."<br><br>";
echo "<b>Sexe : </b>".$row['Sexe']."<br><br>";
echo "<b>Premier Contact : </b>".$row['Admin']."<br><br>";
echo "<b>Fonction : </b>".$row['Position']."<br><br>";
echo "<hr size='3' width='90%'><br><br>";
echo $variable=$post['Nom'];
echo "</form>";
}
else
echo "Echec de connexion";
/*<? print("<input type=\"text\" name=\"$Nom\" size=\"40\">") ; ?>*/
?>
<p align="right"><em><strong></strong></em></p>
<form name="form1" method="post" action="enregistrementEts.php">
<tr>
<tr> </tr>
<div align="center">
<a href="plusieursC.php"><font color="#6699CC">Autre contact ?</FONT></a></div>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td>Nom :<input name="Contact1" type="text" size="40"></td>
<td>Fonction :<input name="Position1" type="text" size="40"></td>
</tr>
<tr>
<td>Telephone :<input name="Telephone1" type="text" size="40"></td>
<td>Port : <input name="Port1" type="text" size="40"></td>
</tr>
<tr>
<td>E-mail :<input name="EMail1" type="text" size="40"></td>
<td>Sexe :<input name="Sexe1" type="text" size="40"></td>
</tr>
</table>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td>Nom:<input name="Contact2" type="text" size="40"></td>
<td>Fonction:<input name="Position2" type="text" size="40"></td>
</tr>
<tr>
<td>Telephone:<input name="Telephone2" type="text" size="40"></td>
<td>Port : <input name="Port2" type="text" size="40"></td>
</tr>
<tr>
<td>E-mail :<input name="EMail2" type="text" size="40"></td>
<td>Sexe :<input name="Sexe2" type="text" size="40"></td>
</tr>
</table>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td>Nom:<input name="Contact3" type="text" size="40"></td>
<td>Fonction:<input name="Position3" type="text" size="40"></td>
</tr>
<tr>
<td>Telephone:<input name="Telephone3" type="text" size="40"></td>
<td>Port : <input name="Port3" type="text" size="40"></td>
</tr>
<tr>
<td>E-mail :<input name="EMail3" type="text" size="40"></td>
<td>Sexe :<input name="Sexe3" type="text" size="40"></td>
</tr>
</table>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td><p>Commentaire:</p>
<p>
<textarea name="Commentaire" cols="78"rows="4"></textarea>
</p>
</td>
</tr>
</table>
<table width="69%" border="5" cellspacing="1" cellpadding="1">
<tr>
<td>Date de relance :<input name="jour" type="text" value="" size="4">
<select name="mois" size="1">
<option>Janvier</option>
<option>Fevrier</option>
<option>Mars</option>
<option>Avril</option>
<option>Mai</option>
<option>Juin</option>
<option>Juillet</option>
<option>Août</option>
<option>Septembre</option>
<option>Octobre</option>
<option>Novembre</option>
<option>Décembre</option>
</select>
<input type="text" name="annee" size="10" maxlength='4' value="2005">
</tr>
</table>
<p align="center"><input type="submit" value="Envoyer" name="B1">
<input type="reset" value="Rétablir" name="B2"></p>
<!-------------------- affichage message ------------------>
<?
if($erreur=="nomenregistrement")
{
echo"<font color ='red'>Nom enregistré</font>";
}
if($erreur=="enregistrement")
{
echo"<font color ='green'>$Nom enregistré</font>";
}
?>
Alors on récapitule, dans ta page PHP tu peux mettre des balises <?...?> n'importe où. Donc quand tu veux afficher le contenu d'une variable dans un champ de texte, tu as différentes possibilités (print ou echo semblent etre pareils) :
ou
Crois-tu toujours avoir un problème ?
<? print "<input name=nom type=text value=$Nom>" ; ?>
ou
<input name=nom type=text value="<? print $Nom; ?>">
Crois-tu toujours avoir un problème ?
Tu sai tes le( la) meuilleur, merci vraiment bcp.
Sa fait 3 jours que j' éssaye de le faire.
Merci encore.
slt
Sa fait 3 jours que j' éssaye de le faire.
Merci encore.
slt
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question