mailto´s hyperlink solution

mailto´s hyperlink solution

am 16.05.2002 20:16:34 von angelo.rigo

Thank=B4s for who gave me support!

I fix the problem of making mailto=B4s and hyperlinks from a select, using
the pg_fetch_array function the code is below:

$db =3D pg_connect("dbname=3Ddb user=3Dme");
$query =3D "SELECT nome, prof, email, hp FROM table";
$result =3D pg_exec($db, $query);
if (!$result) {printf ("ERROR"); exit;}
$numrows =3D pg_numrows($result);
$row=3D0;
printf ("


");
printf ("
");
do
{
$myrow =3D pg_fetch_array ($result,$row);
if($row % 2) {
$bgcolor=3D"#CCCCCC";
}
else {
$bgcolor=3D"#EEF0EE";
}
printf ("
", $myrow[nome], $myrow[prof], $myrow[email], $myrow[hp]);
$row++;
}
while ($row < $numrows);
printf ("
NomeProfis=E3o<=
/td>
EmailWebsite
%s%s to:$myrow[email]'>%s href=3D'http://$myrow[hp]' target=3D'_blank'>%s

");
pg_close($db);
?>






________________________________________
A busca mais veloz e precisa da internet. Acesse agora: http://www.zoom.com=
..br.


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org