|
|
|
จะเรียกข้อมูลจากฐานข้อมูล มาลงใน html ใช้คำสั่งไรหรองับ (อีกแล้ว) |
|
|
|
|
|
|
|
Code (PHP)
<?php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MDS Modern Home Service</title>
<style>
td{font-family:verdana;font-size:10px}
A {
text-decoration: none;
color:ffffff;
font-size: 10;
font-family: verdana;
font:900;
}
a:visited{color:006699}
a:hover{color:blue}
.bold{font:900}
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH="0" MARGINHEIGHT="0" onLoad="MM_preloadImages('images/b1.jpg','images/b2.jpg','images/b3.jpg','images/b4.jpg','images/b5.jpg')">
<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
<tr>
<td width="50%" background="images/back_all1.jpg"></td>
<td height="100%">
<table border="0" cellpadding="0" cellspacing="0" width="704" height="100%">
<tr>
<td colspan="2"><img src="images/head2.jpg" alt="" width="764" height="186" border="0"></td>
<td width="3" background="images/line_right1.jpg" rowspan="3" valign="top"><img src="images/line_right.jpg" border="0" width="3" height="67" alt=""></td>
</tr>
<tr>
<td colspan="2"><a href="Home.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image5','','images/b11.jpg',1)"><img src="images/b11.jpg" name="Image5" width="105" height="34" border="0"></a><a href="Service.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image6','','images/b22.jpg',1)"><img src="images/b22.jpg" name="Image6" width="102" height="34" border="0"></a><a href="AboutUs.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image7','','images/b33.jpg',1)"><img src="images/b33.jpg" name="Image7" width="103" height="34" border="0"></a><a href="JoinUs.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image8','','images/b44.jpg',1)"><img src="images/b44.jpg" name="Image8" width="101" height="34" border="0"></a><a href="ContactUs.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image9','','images/b55.jpg',1)"><img src="images/b55.jpg" name="Image9" width="104" height="34" border="0"></a><img src="images/b66.jpg" width="249" height="35"></td>
</tr>
<tr>
<td height="467" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="276" height="537" title="TORRider">
<param name="movie" value="images/OK1.swf">
<param name="quality" value="high">
<embed src="images/OK1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="276" height="537"></embed>
</object></td>
<td valign="top" background="images/back_right1.jpg" width="435" style="padding-left:30;padding-right:5">
<font class="bold">HEADER I </font><img src="images/line_dots1.jpg" border="0" width="335" height="20" alt=""><br><br>
............................................................................
.........................................................................
.................................................
...........................................................................
..........................................................................
//เอา ตรงนี้งับ เรียกมันมายังไงดี
.............................................................................
..........................................................................
..........................................................................
.........................................................................
.........................................
....................................
.</b></b> </td>
</tr>
<tr>
<td background="images/login_back1.jpg" valign="top">
<table border="0" cellspacing="0" cellpadding="0">
<form action="main.php" method="post"><tr>
<td align="right" style="font:900;padding-left:20;font-size:11">Login: </td>
<td style="padding-left:5"><input type="text" name="login_text" size="15" maxlength="40" style="width:150"></td>
</tr>
<tr>
<td align="right" style="font:900;padding-left:20;font-size:11">Password: </td>
<td style="padding-left:5"><input type="password" name="pass_text" size="15" maxlength="40" style="width:150"></td>
</tr>
<tr>
<td></td>
<td style="padding-top:10;padding-right:2" align="right"><a href="main.php" target="main"><input name="image" type="image" src="images/login_but.jpg" align="bottom" width="48" height="19" border="0"></a></td>
</tr></form>
</table> </td>
<td><img src="images/partners1.jpg" border="0" width="490" height="128" alt=""></td>
<td width="3"><img src="images/line_right21.jpg" border="0" width="3" height="128" alt=""></td>
</tr>
<tr>
<td colspan="3" height="100%" style="padding-top:20" background="images/back_all1.jpg"> </td>
</tr>
</table>
</td>
<td width="50%" background="images/back_all1.jpg"></td>
</tr></table>
</body>
</html>
?>
Tag : - - - -
|
|
|
|
|
|
Date :
2009-03-25 13:46:57 |
By :
torrider |
View :
1222 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (Html + php)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>MDS Modern Home Service</title>
<style>
td{font-family:verdana;font-size:10px}
A {
text-decoration: none;
color:ffffff;
font-size: 10;
font-family: verdana;
font:900;
}
a:visited{color:006699}
a:hover{color:blue}
.bold{font:900}
</style>
</head>
<body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH="0" MARGINHEIGHT="0" onLoad="MM_preloadImages('images/b1.jpg','images/b2.jpg','images/b3.jpg','images/b4.jpg','images/b5.jpg')">
<table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
<tr> <td>name</td><td>surname</td></tr>
<?
$sql = "select * from profile";
$result = mysql_query($sql) or die ("SQL ERROR!!");
while($row = mysql_fetch_array($result )){
?>
<tr><td><?=$row["name"]?></td><td><?=$row["surname"]?></td></tr>
<?
}
mysql_close();
?>
</table>
</body>
</html>
อันนี้เป็นตัวอย่าง สั่นๆ นะครับ
ลอง ดันแปรทำดูนะครับ
ติดตรงไหนถามได้ครับ
|
|
|
|
|
Date :
2009-03-25 14:11:39 |
By :
dr.website |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ครับ ขอลองก่อน --0--
|
|
|
|
|
Date :
2009-03-25 14:12:32 |
By :
torrider |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|