Précédent   Forum des professionnels en informatique > Bases de données > MySQL > SQL Procédural
SQL Procédural Forum d'entraide sur les triggers, les procédures stockées et les fonctions en MySQL
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 27/12/2006, 14h55   #1
Membre habitué
 
Inscription : mai 2006
Messages : 382
Détails du profil
Informations personnelles :
Âge : 26
Localisation : France, Nord (Nord Pas de Calais)

Informations forums :
Inscription : mai 2006
Messages : 382
Points : 118
Points : 118
Par défaut realiser un lien hypertext sur une donnee sortant d'une base mysql

bonjour

je souhaite realiser un lien hypertext sur l'adresse email mais je ne sais pas comment le faire à cause du code php (je ne sais pas si je ne suis fais comprendre.lol)

voici ma page en php :
Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<html><head><title>Super Diet Production --> Votre trombinoscope</title></head>

<body>
<div align="center">
  <center>
  <table border="0" bordercolor="#000000" width="897" height="661" >
    <tr>
      <td width="151" height="145"><img src="photos/coccinelle.jpg" width="206" height="165"></td>
      <td width="338" height="145" align="center"><i>Super Diet est une société leader dans les métiers de la santé au naturel et des compléments alimentaires. Super Diet exporte dans plus de 20 pays sur tous les continents. Depuis 40 ans, Super Diet fonctionne dans le plus grand respect des principes éthiques hérités de ses fondateurs.</i></td>
      <td width="392" height="145"><img border="0" src="photos/baniere.png" width="394" height="164"></td>
    </tr>
    <tr>
      <td width="897" height="492" colspan="3" align="center" valign="top"><BR><img src="photos/votretrombinoscope.jpg"><BR><BR><BR>
      <?php
$link = mysql_connect("localhost", "root", "")or die (mysql_error());
mysql_select_db("intranet")or die (mysql_error()) ;
?>

<?php
$log=$_GET['log'] ;
$mdp=$_GET['password'] ;
?>

<?php
$reponse = mysql_query("SELECT personnel.Login_pers, personnel.Password_pers, personnel.num_pers, service.Num_service, personnel.Nom_pers, personnel.Prenom_pers, personnel.Fonction_pers, personnel.Societe_pers, personnel.Photo_pers, personnel.Statut_pers, personnel.Tel_pers, personnel.Email_pers  from personnel, service WHERE ((Login_pers LIKE '%$log%') AND (Password_pers LIKE '%$mdp%')) AND personnel.num_pers=service.Num_service ") ;

while ($donnees = mysql_fetch_array($reponse))
{
if (($donnees ['Login_pers'] == $log) AND ($donnees ['Password_pers'] == $mdp))
	{
	echo "<div align='center'>
  <center>
  <table border='1' width='628' height='398'>
    <tr>
      <td width='386' height='60' align='center'><font size='5' color='#FF0000'><img src='photos/boulecligno.gif'>" .$donnees ['Nom_pers']. "&nbsp;" .$donnees ['Prenom_pers']. "</font></td>
      <td width='226' height='398' rowspan='6' align='center'>" .$donnees ['Photo_pers']. "</td>
    </tr>
    <tr>
      <td width='386' height='60' align='center'><font size='5'>" .$donnees ['Fonction_pers']. "</font></td>
    </tr>
    <tr>
      <td width='386' height='60' align='center'><font size='5'>Société : " .$donnees ['Societe_pers']. "</font></td>
    </tr>
    <tr>
      <td width='386' height='60' align='center'><font size='5'>Statut : " .$donnees ['Statut_pers']. "</font></td>
    </tr>
    <tr>
      <td width='386' height='60' align='center'><font size='5'>Téléphone : " .$donnees ['Tel_pers']. "</font></td>
    </tr>
    <tr>
      <td width='386' height='60' align='center'><font size='5'>Email : " .$donnees ['Email_pers']. "</font></td>    </tr>
  </table>
  </center>
</div>" ;

	}
	else
			{
				echo "Problème d'affichage, réessayez plus tard!!! merci" ;
			}
}


mysql_close() ;

?>
</td>
    </tr>
  </table>
  </center>
</div>


</body>


</html>
je souhaite mettre le lien sur l'adresse Email qui pointe vers la messagerie.

merci d'avance

ciao
leclone est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/12/2006, 14h58   #2
Expert Confirmé

 
Avatar de Amara
 
Inscription : juillet 2004
Messages : 2 684
Détails du profil
Informations personnelles :
Localisation : France, Sarthe (Pays de la Loire)

Informations forums :
Inscription : juillet 2004
Messages : 2 684
Points : 2 910
Points : 2 910
Code :
<td width='386' height='60' align='center'><font size='5'>Email : <a href='" . $donnees ['Email_pers'] . "'>" .$donnees ['Email_pers']. "</a></font></td>
A voir.
__________________
Pas de questions techniques par MP, le forum est là pour ça et est plus efficace.

Orthographe : une connexion (avec un x), un langage (sans u), une requête (un seul t), 'une quote' (avec qu), une syntaxe (sans h)
Amara est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/12/2006, 15h17   #3
Membre habitué
 
Inscription : mai 2006
Messages : 382
Détails du profil
Informations personnelles :
Âge : 26
Localisation : France, Nord (Nord Pas de Calais)

Informations forums :
Inscription : mai 2006
Messages : 382
Points : 118
Points : 118
slt

ça marche mais il faut le mailto où car sinon il me crée une page avec le mail.

merci

@+
leclone est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/12/2006, 15h19   #4
Membre habitué
 
Inscription : mai 2006
Messages : 382
Détails du profil
Informations personnelles :
Âge : 26
Localisation : France, Nord (Nord Pas de Calais)

Informations forums :
Inscription : mai 2006
Messages : 382
Points : 118
Points : 118
c bon j'ai trouvé. Voici le bon code :

Code :
    <td width='386' height='60' align='center'><font size='5'>Email : <a href='mailto:" . $donnees ['Email_pers'] . "'>" .$donnees ['Email_pers']. "</a></font></td>
un grd merci

a+
leclone est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/12/2006, 15h44   #5
Expert Confirmé

 
Avatar de Amara
 
Inscription : juillet 2004
Messages : 2 684
Détails du profil
Informations personnelles :
Localisation : France, Sarthe (Pays de la Loire)

Informations forums :
Inscription : juillet 2004
Messages : 2 684
Points : 2 910
Points : 2 910
Citation:
Envoyé par leclone
slt

ça marche mais il faut le mailto où car sinon il me crée une page avec le mail.

merci

@+
Ah bah oui mince
M'enfin bon c'était le principe on va dire (un minimim de réflexion aurait amené une solution très rapidement au passage...).
__________________
Pas de questions techniques par MP, le forum est là pour ça et est plus efficace.

Orthographe : une connexion (avec un x), un langage (sans u), une requête (un seul t), 'une quote' (avec qu), une syntaxe (sans h)
Amara est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 00h18.


 
 
 
 
Partenaires

Hébergement Web