Affichage de valeur php/mysql
Fermé
oumouri
Messages postés
25
Date d'inscription
vendredi 24 juin 2005
Statut
Membre
Dernière intervention
7 novembre 2005
-
21 sept. 2005 à 15:39
oumouri Messages postés 25 Date d'inscription vendredi 24 juin 2005 Statut Membre Dernière intervention 7 novembre 2005 - 21 sept. 2005 à 16:24
oumouri Messages postés 25 Date d'inscription vendredi 24 juin 2005 Statut Membre Dernière intervention 7 novembre 2005 - 21 sept. 2005 à 16:24
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
- Easy php - Télécharger - Divers Web & Internet
- Affichage double ecran - Guide
- Mysql community server - Télécharger - Bases de données
- Logiciel gratuit calcul valeur nutritionnelle - Télécharger - Santé & Bien-être
- Windows 11 affichage classique - Guide
3 réponses
Erdnax
Messages postés
2273
Date d'inscription
mercredi 1 octobre 2003
Statut
Contributeur
Dernière intervention
1 octobre 2007
497
21 sept. 2005 à 15:59
21 sept. 2005 à 15:59
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 ;)
@+
oumouri
Messages postés
25
Date d'inscription
vendredi 24 juin 2005
Statut
Membre
Dernière intervention
7 novembre 2005
11
21 sept. 2005 à 16:23
21 sept. 2005 à 16:23
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";
?>
oumouri
Messages postés
25
Date d'inscription
vendredi 24 juin 2005
Statut
Membre
Dernière intervention
7 novembre 2005
11
21 sept. 2005 à 16:24
21 sept. 2005 à 16:24
j'utilise DREMWEAVER MX 2004, EASYPHP1.8