สร้าง list/menu เพื่อส่งไปยังฐานข้อมูล และ รับข้อมูล ได้ยังไงคับ
ยังไง ลองอธิบายให้เห็นภาพหน่อย
Date :
2011-04-12 11:03:50
By :
ipball
ทราบเกียวกับการสร้าง list/menu เพื่อส่งไปยัง ฐานข้อมูล แล้วให้ฐานข้อมูล ส่งมายังหน้าโพส ที่สร้างตารางโพสไว้อะครับ คือผมได้สร้างฐานข้อมูลควบคุมไนโตรเจนไว้แล้วได้สร้างหน้า ส่งข้อมูล และหน้ารับไว้เรียบร้อยแล้วแต่ยัง งงกับการสร้างไฟล์
ติดต่อฐานข้อมูลโดยให้ เจ้าตัว list/menu เป็นตัวส่งขอคามไปยังหน้าโพส ซื้อเป็นตารางแสดงผล จะมีหน้าตัวอย่างมาให้ดูครับ
ตัวนี้คือตัวหน้ารับแบบฟรอมที่สร้างมาเพื่อรับข้อความโดย 1ช่องนั้นจะจะรับข้อความได้ 4 ข้อความคับ คือ Used Empty spare
Tank Damage ดังรูปนี้
นี่คือหน้าตาตัวส่งข้อมูลครับ โดยผมใช้ list/menu เป็นตัวเลือกส่งข้อความ 4ข้อความนั้น ให้ออกไปแสดงผลในหน้าแสดงข้อมูลซึ่งใน 1ช่องมี 4ข้อความให้เลือก 1อย่าง คือตอนนี้ผมได้ สร้างฐานข้อมูลไว้เรียบร้อยแล้ว
นี่คือโค๊ดฐานข้อมูล ni2.sql
-- phpMyAdmin SQL Dump
-- version 2.10.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 12, 2011 at 10:59 AM
-- Server version: 6.0.4
-- PHP Version: 6.0.0-dev
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `ni2`
--
-- --------------------------------------------------------
--
-- Table structure for table `status`
--
CREATE TABLE `status` (
`id` int(2) NOT NULL AUTO_INCREMENT,
`No.1` text NOT NULL,
`No.2` text NOT NULL,
`No.3` text NOT NULL,
`No.4` text NOT NULL,
`No.5` text NOT NULL,
`No.6` text NOT NULL,
`No.7` text NOT NULL,
`No.8` text NOT NULL,
`No.9` text NOT NULL,
`No.10` text NOT NULL,
`No.11` text NOT NULL,
`No.12` text NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- Dumping data for table `status`
--
INSERT INTO `status` VALUES (1, '', '', '', '', '', '', '', '', '', '', '', '', '0000-00-00', '00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE `user` (
`id` int(3) NOT NULL AUTO_INCREMENT,
`user` text NOT NULL,
`password` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
--
-- Dumping data for table `user`
--
INSERT INTO `user` VALUES (1, '', '');
INSERT INTO `user` VALUES (2, 'ADMIN\r\nMEMBER', '*5DD5C629B8C9E9E9426EDA4A3644F20AA162A442');
คือนี้นี้ผมอยากทราบการติดต่อ ฐานข้อมูลโดยให้ list/menu ตัวนี้ไป แสดงที่หน้าโพสยังไง ครับช่วยออกแนวคิดหน่อยคับ ถ้าใครใจดี
ช่วยเขียนโค๊ดติดต่อฐานข้อมูลในการรับและส่งพวกนี้ให้หน่อยน้า
ส่วนข้างล่านี้คือโค๊ด แบบฟรอบ รับ และ ส่งคับ
โค๊ดแบบฟรอมรับคับ
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<style type="text/css">
<!--
.style1 {
color: #006600;
font-weight: bold;
}
.style2 {
color: #0000FF;
font-weight: bold;
}
.style3 {
color: #FF0000;
font-weight: bold;
}
.style4 {font-weight: bold}
.style5 {
color: #666666;
font-weight: bold;
}
.style6 {color: #666666}
-->
</style>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" width="1310">
<col width="35" />
<col width="145" />
<col width="77" span="8" />
<col width="75" span="6" />
<col width="64" />
<tr height="26">
<td colspan="15" height="26" width="1211" align="left" valign="top"><div align="center" class="style4"><img src="admin2/Tri Minimal/Status nitrogen tank _2143_image001.gif" alt="1" width="2" height="2" />
<table cellpadding="0" cellspacing="0">
<tr>
<td colspan="15" height="26" width="1211"><div align="center"><a name="RANGE!B2:P22" id="RANGE!B2:P22">STATUS Nitrogen tank start shift</a></div></td>
</tr>
</table>
</div></td>
</tr>
<tr height="29">
<td height="29"><div align="center"></div></td>
<td colspan="14"><div align="center"><strong>WW 15</strong></div></td>
</tr>
<tr height="34">
<td height="34" bgcolor="#99FF99"><div align="center"><strong>Number Of</strong></div></td>
<td colspan="2" bgcolor="#FFFF00"><div align="center"></div></td>
<td colspan="2" bgcolor="#FF00FF"><div align="center"></div></td>
<td colspan="2" bgcolor="#00FF00"><div align="center"></div></td>
<td colspan="2" bgcolor="#FF9900"><div align="center"></div></td>
<td colspan="2" bgcolor="#00FFFF"><div align="center"></div></td>
<td colspan="2" bgcolor="#9966FF"><div align="center"></div></td>
<td colspan="2" bgcolor="#FF0000"><div align="center"></div></td>
</tr>
<tr height="26">
<td height="26" bgcolor="#99FF99"><div align="center"><strong>Nitrogen tank</strong></div></td>
<td width="1211"><div align="center"><strong>Day</strong></div></td>
<td width="1211"><div align="center"><strong>Night</strong></div></td>
<td width="1211"><div align="center"><strong>Day</strong></div></td>
<td width="1211"><div align="center"><strong>Night</strong></div></td>
<td width="1211"><div align="center"><strong>Day</strong></div></td>
<td width="1211"><div align="center"><strong>Night</strong></div></td>
<td width="1211"><div align="center"><strong>Day</strong></div></td>
<td width="1211"><div align="center"><strong>Night</strong></div></td>
<td width="1211"><div align="center"><strong>Day</strong></div></td>
<td width="1211"><div align="center"><strong>Night</strong></div></td>
<td width="1211"><div align="center"><strong>Day</strong></div></td>
<td width="1211"><div align="center"><strong>Night</strong></div></td>
<td width="1211"><div align="center"><strong>Day</strong></div></td>
<td width="1211"><div align="center"><strong>Night</strong></div></td>
</tr>
<tr height="33">
<td height="33" bgcolor="#99FF99"><div align="center"><strong>No.1</strong></div></td>
<td><div align="center">
<form id="form1" name="form1" method="post" action="">
</form>
</div></td>
<td><div align="center">
<form action="" method="post" name="form2" id="form2">
</form>
</div></td>
<td><div align="center">
<form id="form3" name="form3" method="post" action="">
</form>
</div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="33">
<td height="33" bgcolor="#99FF99"><div align="center"><strong>No.2</strong></div></td>
<td><div align="center">
<form id="form4" name="form4" method="post" action="">
</form>
</div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="33">
<td height="33" bgcolor="#99FF99"><div align="center"><strong>No.3</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="33">
<td height="33" bgcolor="#99FF99"><div align="center"><strong>No.4</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="36">
<td height="36" bgcolor="#99FF99"><div align="center"><strong>No.5</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="36">
<td height="36" bgcolor="#99FF99"><div align="center"><strong>No.6</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="36">
<td height="36" bgcolor="#99FF99"><div align="center"><strong>No.7</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="36">
<td height="36" bgcolor="#99FF99"><div align="center"><strong>No.8</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="36">
<td height="36" bgcolor="#99FF99"><div align="center"><strong>No.9</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="33">
<td height="33" bgcolor="#99FF99"><div align="center"><strong>No.10</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="33">
<td height="33" bgcolor="#99FF99"><div align="center"><strong>No.11</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="33">
<td height="33" bgcolor="#99FF99"><div align="center"><strong>No.12</strong></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
<td><div align="center"></div></td>
</tr>
<tr height="25">
<td colspan="5"><div align="left"><strong>Remark:</strong></div></td>
<td colspan="10" rowspan="5"><div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"></div> <div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div> <div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div> <div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div> <div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div> <div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div> <div align="center"></div></td>
</tr>
<tr height="25">
<td height="25" bgcolor="#99FF99"><div align="center" class="style1">Used :</div></td>
<td colspan="4" bgcolor="#99FF99"><div align="left"><strong>Used</strong></div></td>
</tr>
<tr height="25">
<td height="25" bgcolor="#99FF99"><div align="center" class="style2">Spare :</div></td>
<td colspan="4" bgcolor="#99FF99"><strong>
</strong>
<div align="left"><strong>Spare for support</strong></div></td>
</tr>
<tr height="25">
<td height="25" bgcolor="#99FF99"><div align="center" class="style3">Empty :</div></td>
<td colspan="4" bgcolor="#99FF99"><strong>
</strong>
<div align="left"><strong>Tank no nitrogen A/W facility support</strong></div></td>
</tr>
<tr height="25">
<td bordercolor="#ECE9D8" bgcolor="#99FF99"><div align="left" class="style5"><span class="style6">Tank Damge </span>: </div>
<div align="center"></div>
<div align="center"></div> <div align="center"></div></td>
<td colspan="4" bordercolor="#ECE9D8" bgcolor="#99FF99"><strong>Tank can' t repair </strong></td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit" />
</body>
</html>
แบบฟรอมการส่งคับ
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- TemplateEndEditable -->
<!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<style type="text/css">
<!--
.style1 { color: #006600;
font-weight: bold;
}
.style2 { color: #0000FF;
font-weight: bold;
}
.style3 { color: #FF0000;
font-weight: bold;
}
body {
background-image: url(images/or13.jpg);
}
-->
</style>
</head>
<body>
<div align="center">
<p> </p>
<form id="form2" name="form2" method="post" action="">
</form>
<table width="242" height="497" border="1" cellpadding="0" cellspacing="0">
<col width="35" />
<col width="145" />
<col width="77" span="8" />
<col width="75" span="6" />
<col width="64" />
<tr height="34">
<td width="112" height="34" bgcolor="#99FF99"><div align="center"><strong>Number Of</strong></div></td>
<td colspan="2" bgcolor="#FFFF00"><div align="center"><a name="RANGE!B2:P22" id="RANGE!B2:P22">STATUS Nitrogen tank start shift</a></div></td>
</tr>
<tr height="26">
<td height="26" bgcolor="#99FF99"><div align="center"><strong>Nitrogen tank</strong></div></td>
<td width="149"><div align="center"><strong>Day</strong></div></td>
<td width="1041"><div align="center"><strong>Night</strong></div></td>
</tr>
<tr height="33">
<td height="24" bgcolor="#99FF99"><div align="center"><strong>No.1</strong></div></td>
<td width="149" height="24"><div align="center">
<form id="form1" name="form1" method="post" action="">
<select name="select_01" id="select_01">
<option value="84" selected="selected">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</form>
</div></td>
<td><div align="center">
<select name="select2">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="33">
<td height="27" bgcolor="#99FF99"><div align="center"><strong>No.2</strong></div></td>
<td><div align="center">
<select name="select3">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
<td><div align="center">
<select name="select4">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="33">
<td height="27" bgcolor="#99FF99"><div align="center"><strong>No.3</strong></div></td>
<td><select name="select5">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select></td>
<td><div align="center">
<select name="select6">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="33">
<td height="27" bgcolor="#99FF99"><div align="center"><strong>No.4</strong></div></td>
<td><div align="center">
<select name="select7">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
<td><div align="center">
<select name="select8">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="36">
<td height="26" bgcolor="#99FF99"><div align="center"><strong>No.5</strong></div></td>
<td><select name="select9">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select></td>
<td><div align="center">
<select name="select10">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="36">
<td height="25" bgcolor="#99FF99"><div align="center"><strong>No.6</strong></div></td>
<td><div align="center">
<select name="select11">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
<td><select name="select12">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select></td>
</tr>
<tr height="36">
<td height="29" bgcolor="#99FF99"><div align="center"><strong>No.6</strong></div></td>
<td><div align="center">
<select name="select13">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
<td><select name="select14">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select></td>
</tr>
<tr height="36">
<td height="24" bgcolor="#99FF99"><div align="center"><strong>No.7</strong></div></td>
<td><div align="center">
<select name="select15">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
<td><div align="center">
<select name="select16">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="36">
<td height="26" bgcolor="#99FF99"><div align="center"><strong>No.8</strong></div></td>
<td><select name="select17">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select></td>
<td><div align="center">
<select name="select18">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="33">
<td height="29" bgcolor="#99FF99"><div align="center"><strong>No.9</strong></div></td>
<td><div align="center">
<select name="select19">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
<td><div align="center">
<select name="select20">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="33">
<td height="24" bgcolor="#99FF99"><div align="center"><strong>No.10</strong></div></td>
<td><select name="select21">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select></td>
<td><select name="select22">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select></td>
</tr>
<tr height="33">
<td height="28" bgcolor="#99FF99"><div align="center"><strong>No.11</strong></div></td>
<td><div align="center">
<select name="select23">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
<td><div align="center">
<select name="select24">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
</tr>
<tr height="33">
<td height="26" bgcolor="#99FF99"><div align="center"><strong>No.12</strong></div></td>
<td><div align="center">
<select name="select">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</div></td>
<td><div align="center">
<form id="form4" name="form4" method="post" action="">
<label for="select"></label>
<label></label>
<select name="select25">
<option value="84">----------------</option>
<option value="84">Used</option>
<option value="84">Spare</option>
<option value="84">Empty</option>
<option value="84">Tank Damage</option>
</select>
</form>
</div></td>
</tr>
<tr height="33">
<td height="69" colspan="3" bgcolor="#99FF99"><div align="center">
<form>
<label>
<input type="submit" name="Submit" value="save" />
<br />
</label>
<input type=button value="Refresh" onClick="javascript:location.reload();">
</form>
</div></td>
</tr>
</table>
<form id="form3" name="form3" method="post" action="">
<label></label>
</form>
<p> </p>
<p> </p>
</div>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p> </p>
</body>
</html>
ช่วยเขียนการติดต่อให้หน่อยนะคับผมไม่ค่อยเข้าใจใครมีข้อเสนอแนะอาไรดีๆช่วยบอกหน่อยนะคับขอบคุณครับ
ประวัติการแก้ไข 2011-04-12 11:16:34
Date :
2011-04-12 11:15:08
By :
sambeem001
แล้วการติดต่อฐานข้อมูลแบบนี้ถูกมั้ยครับ
Code (PHP)
<?php
$host = "localhost" ; //
$username = "root" ; //
$password = "test" ; //
$dbname = "ni2" ; //
$tblname = "status"
mysqlconnect($hostname,$user,$password) or die(" ติดต่อฐานข้อมูลไม่สำเร็จ");
mysql_select_db($dbname) or die("เลือกฐานข้อมูลไม่ได้");
$sql="select*from $tblname";
$dbquery=mysql_db_quersy($dbname,$sql);
$num_rows=mysql_num_rows($dbquery);
$num_fields=mysql_num_fields($dbquery);
?>
Date :
2011-04-12 11:28:22
By :
sambeem001
Load balance : Server 03