Affichage de valeur php/mysql
oumouri
Messages postés
25
Statut
Membre
-
oumouri Messages postés 25 Statut Membre -
oumouri Messages postés 25 Statut Membre -
Bonjour.Je viens d'enregistrer des données ds la base de donnée.
j'utilise easyphp1.8.l'enregistrement et bien effectuer.lorsque je veux afficher les données, le script n'affiche que le premier mot et laisse tomber les autres par contre si je concatenne le tout, meme s'il y'a 200 caractere il les affiche.Donc à ce que j'ai pu comprendre c'est l'espace lors de l'enregistrement qui pose proble me .lorsque j'enregistre ds la BD, les espaces existent bel et bien mais lors de l'affichage tte la partie qui vient aprés l'affichage ne s'affiche pas bien qu'existant.
Merci pour votre patience de lire toute ces lignes.
fardi
j'utilise easyphp1.8.l'enregistrement et bien effectuer.lorsque je veux afficher les données, le script n'affiche que le premier mot et laisse tomber les autres par contre si je concatenne le tout, meme s'il y'a 200 caractere il les affiche.Donc à ce que j'ai pu comprendre c'est l'espace lors de l'enregistrement qui pose proble me .lorsque j'enregistre ds la BD, les espaces existent bel et bien mais lors de l'affichage tte la partie qui vient aprés l'affichage ne s'affiche pas bien qu'existant.
Merci pour votre patience de lire toute ces lignes.
fardi
A voir également:
- Affichage de valeur php/mysql
- Affichage double ecran - Guide
- Easy php - Télécharger - Divers Web & Internet
- Windows 11 affichage classique - Guide
- Mysql community download - Télécharger - Bases de données
- Expert php pinterest - Télécharger - Langages
3 réponses
Salut,
Il serait plus simple pour nous de t'aider si tu nous fournissait la partie de code impliquée ;)
@+
Il serait plus simple pour nous de t'aider si tu nous fournissait la partie de code impliquée ;)
@+
Merci bien voici le code qui affiche à l'interieur de zone de texte.
*****************************************************
if (isset($_POST['matricule']))
{ #2
$matricule=$_POST['matricule'];
$req="select mat, nom, prenom, datenaiss, nationalite, civilite, ville, tel, courriel, fax, adresse, formation, experience, langue, date
FROM agent
WHERE mat='$matricule'";
$resultat=mysql_query($req);
if ($resultat)
{ #3?>
<form name="form_modif_val" method="post" action="suppagentafftrait.php">
<table width="500" border="0" align="center" cellpadding="6">
<? while($lignes=mysql_fetch_array ($resultat))
{ #4
?>
<p></p>
<p></p>
<p></p>
<tr bgcolor='#000099'><th align='left'><font color=white> <h3> Renseignements</h></th><th align='left'><font color=white><h3>Valeurs</h></th></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Matricule :</span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="matricule" type="text" size="50" value=<? echo $lignes[0] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Nom :</span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="nom" type="text" size="50" value=<? echo $lignes[1] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Prénom : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="prenom" type="text" size="50" value=<? echo $lignes[2] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Né (e) le : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="datenaiss" type="text" size="50" value=<? echo $lignes[3] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Nationalité : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="nationalite" type="text" size="50" value=<? echo $lignes[4] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Civilite : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="civilite" type="text" size="50" value=<? echo $lignes[5] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Ville : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="ville" type="text" size="50" value=<? echo $lignes[6] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Téléphone : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="tel" type="text" size="50" value=<? echo $lignes[7] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Courriel : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="courriel" type="text" size="50" value=<? echo $lignes[8] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Fax : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="fax" type="text" size="50" value=<? echo $lignes[9] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Adresse: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="adresse" type="text" size="50" value=<? echo $lignes[10] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Formation: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="formation" type="text" size="50" value=<? echo $lignes[11] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Experience: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="experience" type="text" size="50" value=<? echo $lignes[12] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Langue: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="langue" type="text" size="50" value=<? echo $lignes[13] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Date: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="date" type="text" size="50" value=<? echo $lignes[14] ?> ></td></tr>
<?
#4'
} ?>
<td bordercolor="#66CCCC" bgcolor="#F2EAD6" align='right' ><input name="cmd_modifier" type="submit" id="cmd_modifier" value="Supprimer"></td>
</table>
</form>
<?
#3'
} else {echo "req ne marche pas"; }
} #2'
else echo "Veuillez entrer un numero de carte";
// } #1'
// elseif ($_POST['
// echo "le Bouton reech n'a pas été cliquée";
?>
*****************************************************
if (isset($_POST['matricule']))
{ #2
$matricule=$_POST['matricule'];
$req="select mat, nom, prenom, datenaiss, nationalite, civilite, ville, tel, courriel, fax, adresse, formation, experience, langue, date
FROM agent
WHERE mat='$matricule'";
$resultat=mysql_query($req);
if ($resultat)
{ #3?>
<form name="form_modif_val" method="post" action="suppagentafftrait.php">
<table width="500" border="0" align="center" cellpadding="6">
<? while($lignes=mysql_fetch_array ($resultat))
{ #4
?>
<p></p>
<p></p>
<p></p>
<tr bgcolor='#000099'><th align='left'><font color=white> <h3> Renseignements</h></th><th align='left'><font color=white><h3>Valeurs</h></th></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Matricule :</span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="matricule" type="text" size="50" value=<? echo $lignes[0] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Nom :</span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="nom" type="text" size="50" value=<? echo $lignes[1] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Prénom : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="prenom" type="text" size="50" value=<? echo $lignes[2] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Né (e) le : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="datenaiss" type="text" size="50" value=<? echo $lignes[3] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Nationalité : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="nationalite" type="text" size="50" value=<? echo $lignes[4] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Civilite : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="civilite" type="text" size="50" value=<? echo $lignes[5] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Ville : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="ville" type="text" size="50" value=<? echo $lignes[6] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Téléphone : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="tel" type="text" size="50" value=<? echo $lignes[7] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Courriel : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="courriel" type="text" size="50" value=<? echo $lignes[8] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Fax : </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="fax" type="text" size="50" value=<? echo $lignes[9] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Adresse: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="adresse" type="text" size="50" value=<? echo $lignes[10] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Formation: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="formation" type="text" size="50" value=<? echo $lignes[11] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Experience: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="experience" type="text" size="50" value=<? echo $lignes[12] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Langue: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="langue" type="text" size="50" value=<? echo $lignes[13] ?> ></td></tr>
<tr><th align='left' bgcolor="#F2EAD6"><span class="Style5">Date: </span></th>
<td colspan="0" bordercolor="#66CCCC" bgcolor="#F2EAD6">
<input name="date" type="text" size="50" value=<? echo $lignes[14] ?> ></td></tr>
<?
#4'
} ?>
<td bordercolor="#66CCCC" bgcolor="#F2EAD6" align='right' ><input name="cmd_modifier" type="submit" id="cmd_modifier" value="Supprimer"></td>
</table>
</form>
<?
#3'
} else {echo "req ne marche pas"; }
} #2'
else echo "Veuillez entrer un numero de carte";
// } #1'
// elseif ($_POST['
// echo "le Bouton reech n'a pas été cliquée";
?>