phpbar.de logo

Mailinglisten-Archive

[php] ausgabe in tabellenform

[php] ausgabe in tabellenform

Frank Leprich vh3 bassboot_(at)_gmx.net
Wed, 7 Jul 1999 23:24:31 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_000A_01BEC8CF.DE4B12C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hallo Liste.
Ich bekomme eine Tabellenausgabe auf diese Art und Weise:
----------------------------------------------------------------------------
-----------------
<?php
mysql_connect("localhost", "root", "*******");
mysql_select_db("basser");
$result = mysql_query("SELECT * FROM adressen");
$rows = mysql_num_rows($result);
$j = 0;
while ($j < $rows){
$vn = mysql_result($result, $j, "vname");
$nn = mysql_result($result, $j, "nname");
$st = mysql_result($result, $j, "str");
$pl = mysql_result($result, $j, "plz");
$ot = mysql_result($result, $j, "ort");
$te = mysql_result($result, $j, "phone");
$em = mysql_result($result, $j, "email");
echo $vn." ".$nn." ".$st." ".$pl." ".$ot." ".$te." ".$em."<br>";
$j++;
}
mysql_close();
?>
----------------------------------------------------------------------------
------------------
Was muß ich codieren, um die gleiche Ausgabe in Tabellenform (alá *.asp)
anzuzeigen.

The Master of   BASSBOOT.NET
Frank Leprich  bassboot_(at)_gmx.net


------=_NextPart_000_000A_01BEC8CF.DE4B12C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 5.00.2014.210" name=3DGENERATOR></HEAD>
<BODY bgColor=3D#fffbf0>
<DIV><SPAN class=3D780515518-06071999><SPAN =
class=3D950212221-07071999></SPAN><FONT=20
face=3DArial size=3D2>H<SPAN class=3D950212221-07071999>allo=20
Liste.</SPAN></FONT></SPAN><FONT face=3DArial size=3D2> </FONT>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D780515518-06071999><SPAN=20
class=3D840391521-07071999>Ich bekomme eine Tabellenausgabe auf diese =
Art und=20
Weise:</SPAN></SPAN></FONT></DIV>
<DIV><SPAN class=3D780515518-06071999></SPAN><SPAN=20
class=3D780515518-06071999></SPAN><FONT face=3DArial size=3D2>-<SPAN=20
class=3D780515518-06071999>----------------------------------------------=
----------------------------------------------</SPAN>&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&lt;?php </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>mysql_connect("localhost", "root", =
"<SPAN=20
class=3D780515518-06071999>*******</SPAN>");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>mysql_select_db("basser");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$result =3D mysql_query("SELECT * FROM=20
adressen");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$rows =3D =
mysql_num_rows($result);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$j =3D 0;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>while ($j &lt; $rows){</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$vn =3D mysql_result($result, $j,=20
"vname");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$nn =3D mysql_result($result, $j,=20
"nname");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$st =3D mysql_result($result, $j,=20
"str");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$pl =3D mysql_result($result, $j,=20
"plz");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$ot =3D mysql_result($result, $j,=20
"ort");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$te =3D mysql_result($result, $j,=20
"phone");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$em =3D mysql_result($result, $j,=20
"email");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>echo $vn." ".$nn." ".$st." ".$pl." =
".$ot." ".$te."=20
".$em."&lt;br&gt;";</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>$j++;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>} </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>mysql_close();</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>?&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D780515518-06071999>----------------------------------------------=
------------------------------------------------</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D780515518-06071999><SPAN=20
class=3D840391521-07071999>Was mu=DF ich codieren, um die gleiche =
Ausgabe in=20
Tabellenform (al=E1 *.asp) anzuzeigen.</SPAN></SPAN></FONT></DIV>
<DIV><SPAN class=3D780515518-06071999><SPAN=20
class=3D840391521-07071999></SPAN></SPAN><FONT face=3DArial=20
size=3D2>&nbsp;</FONT></DIV></DIV>
<DIV><FONT face=3DArial size=3D1><U>The Master of<FONT=20
face=3DCourier><STRONG>&nbsp;&nbsp; =
BASSBOOT.NET</STRONG></FONT></U></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Frank Leprich&nbsp; <A=20
href=3D"mailto:bassboot_(at)_gmx.net">bassboot_(at)_gmx.net</A></FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_000A_01BEC8CF.DE4B12C0--



php::bar PHP Wiki   -   Listenarchive