|
 |
|
ช่วยด้วยครับทำไมมันเว้นช่องว่างให้เอง ผมใช้ Dream ช่วยด้วยนะครับ ไม่รู้ว่าเกี่ยวกับปัญหารึป่าว |
|
 |
|
|
 |
 |
|
ให้มันติดกะตัวอักษรเลยเหรอครับ
Code (PHP)
<?php
while ($data = mysql_fetch_array($query))
{
?>
<tr>
<td width="356" height="20">
<div align="left">
<label>
<?=$data['name']?>
<?php echo "<input type='checkbox' name='checkbox".$data['id']."' value=1>";?>
</label>
</div>
</td>
</tr>
<?
echo "<input type='hidden' name='part' value='$part'>";
}
?>
|
 |
 |
 |
 |
Date :
2009-06-02 22:02:27 |
By :
pjgunner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อ่า ไม่ใช่ให้ checkbox มาชิดซ้ายครับ
รูปแบเหมือนเดิม แต่ต้องการให้ชิดขึ้นไปข้างบนน่ะครับ ผมงงว่าทำไมมันเว้นให้เยอะขนาดนั้น
ประมาณแบบนี้ครับ

|
 |
 |
 |
 |
Date :
2009-06-02 22:12:00 |
By :
suzuhara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่เอาไว้ table เดียวกันเลยล่ะคับ
<table width="514" border="0">
<tr>
<td width="356" height="20"> <div align="left">ลักษณะของอาการ</div></td>
<td width="148"><div align="center">โปรดเลือกอาการที่เกิด</div></td>
</tr>
<?
while ($data = mysql_fetch_array($query))
{
?>
<tr>
<td width="356" height="20"><div align="left"><?=$data['name']?></div></td>
<td width="148">
<?php echo "<input type='checkbox' name='checkbox".$data['id']."' value=1>";?></td>
</tr>
<?
echo "<input type='hidden' name='part' value='$part'>";
}
?>
</table>
|
 |
 |
 |
 |
Date :
2009-06-02 22:12:20 |
By :
nut_t02 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ก็ว่า อยู่ งงๆ 
|
 |
 |
 |
 |
Date :
2009-06-02 23:23:24 |
By :
pjgunner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อ่าผมลองรวมไว้ table เดียวกันแล้วแต่ว่า

-*- มันเกิดอะไรขึ้นเนี่ย ตามรูปอ่าครับ มันห่างได้อีก
|
 |
 |
 |
 |
Date :
2009-06-03 00:18:56 |
By :
suzuhara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ต้องเอาโค๊ดทั้งหมดมาดูถึงจะรู้ว่าต้องแก้ยังไง
|
 |
 |
 |
 |
Date :
2009-06-03 02:33:50 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
นี่คือ Code ทั้งหมดของ ไฟล์นี้ครับ
Code (PHP)
<body>
<form name="form1" method="post" action="show_judge.php">
<?php //โชว์โรคทั้งหมดในส่วนที่เลือก
$part = $_POST['part'];//ชื่อฐานข้อมูล
//checknull
function checknull ($var)
{
if (empty($var))
{ echo "<script>
alert('โปรดเลือกตำแหน่งที่จะทำการวินิจฉัย');
history.back();
</script>";
exit();
}
}
checknull ($part);
if ($part == bonedb)
{
$calldb = "bone";
}
elseif ($part == alimentarydb)
{
$calldb = "alimentary";
}
elseif ($part == bladderdb)
{
$calldb = "bladder";
}
elseif ($part == skindb)
{
$calldb = "skin";
}
elseif ($part == blooddb)
{
$calldb = "blood";
}
elseif ($part == contagiousdb)
{
$calldb = "contagious";
}
elseif ($part == anotherdb)
{
$calldb = "another";
}
else
{
echo "ผิดพลาด";
}
$host = "localhost";
$username = "root";
$pass = "root";
$dbname = "$part";//ฐานข้อมูลรวมอาการของแต่ละส่วน
$link = mysql_connect($host,$username,$pass) or die("Connect mysql ERROR!");
mysql_select_db($dbname,$link) or die("connect Database ".$dbname." Error");
mysql_query("SET character_set_client = tis620");
mysql_query("SET character_set_connection = tis620");
mysql_query("SET character_set_database = tis620");
mysql_query("SET character_set_results = tis620");
mysql_query("SET character_set_server = tis620");
?>
<?
$sql = "Select * from $calldb order by id";
$query = mysql_query($sql);
?>
<center><table width="514" border="0">
<tr>
<td width="356" height="20"> <div align="left">ลักษณะของอาการ</div></td>
<td width="148"><div align="center">โปรดเลือกอาการที่เกิด</div></td>
</tr>
<?
while ($data = mysql_fetch_array($query))
{
?>
<tr>
<td width="356" height="20"><div align="left"><?=$data['name']?></div></td>
<td width="148">
<?php echo "<input type='checkbox' name='checkbox".$data['id']."' value=1>";?></td>
</tr>
<?
echo "<input type='hidden' name='part' value='$part'>";
}
?>
</table>
<input type="submit" name="Submit" value="Submit">
<input name="reset" type="reset" id="reset" value="Reset">
</p></center>
</form>
</body>
ผมดู Code แล้ว ไม่มีคำสั่งให้เว้นบรรทัดด้านบนเลยนี่สิ แต่ทำไม แบบนี้มึนครับ -*-
|
 |
 |
 |
 |
Date :
2009-06-03 11:59:29 |
By :
suzuhara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
</p></center> บรรทัดนี้ ลองเอา </p> ออกคับ
|
 |
 |
 |
 |
Date :
2009-06-03 13:03:35 |
By :
pjgunner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำตามคุณ เอี่ยว(Rest) บอกแล้วครับ เหมือนเดิมครับยังเว้นว่างอยู่
|
 |
 |
 |
 |
Date :
2009-06-03 13:28:44 |
By :
suzuhara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<body style="margin:0px;padding:0px;vertical-align:top;">
<form name="form1" method="post" action="show_judge.php" style="margin:0px;">
กันเหนียว
|
 |
 |
 |
 |
Date :
2009-06-03 19:08:01 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
<body style="margin:0px;padding:0px;vertical-align:top;">
<form name="form1" method="post" action="show_judge.php" style="margin:0px;">
อันนี้ช่วยให้ขึ้นมาหน่อยนึงครับ แต่ก็ยังดีกว่าห่างน่าเกียจครับ ขอบคุณ คุณ PlaKriM มากครับ
|
 |
 |
 |
 |
Date :
2009-06-04 12:38:29 |
By :
suzuhara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเอาซอร์สโค้ดที่ บราวเซอร์มาดูครับ
|
 |
 |
 |
 |
Date :
2009-06-04 12:55:58 |
By :
pjgunner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลองเอาซอร์สโค้ดที่ บราวเซอร์มาดูครับ
อ่าอันนี้ต้องเอามาจากตรงไหนหรอครับ -*-
|
 |
 |
 |
 |
Date :
2009-06-04 20:43:26 |
By :
suzuhara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
view source อะ
|
 |
 |
 |
 |
Date :
2009-06-05 00:50:34 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
นี่ครับ View Source รบกวนด้วยครับ ขอบคุณครับ
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>วินิจฉัยโรคสุนัขเบื้องต้น</title>
<meta http-equiv=Content-Type content="text/html; charset=tis-620">
</head>
<body style="margin:0px;padding:0px;vertical-align:top;">
<form name="form1" method="post" action="show_judge.php" style="margin:0px;">
<center><table width="514" border="0">
<tr>
<td width="356" height="20"> <div align="left">ลักษณะของอาการ</div></td>
<td width="148"><div align="center">โปรดเลือกอาการที่เกิด</div></td>
</tr>
<tr>
<td width="356" height="20"><div align="left">กระสับกระส่ายเมื่อคลำบริเวณลำคอ</div></td>
<td width="148">
<input type='checkbox' name='checkbox1' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ซึม</div></td>
<td width="148">
<input type='checkbox' name='checkbox2' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">เบื่ออาหาร</div></td>
<td width="148">
<input type='checkbox' name='checkbox3' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">น้ำลายสอ</div></td>
<td width="148">
<input type='checkbox' name='checkbox4' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">กลืนอาหารลำบาก</div></td>
<td width="148">
<input type='checkbox' name='checkbox5' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">เจ็บบริเวณปาก</div></td>
<td width="148">
<input type='checkbox' name='checkbox6' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">เลือดออกบริเวณปากและเหงือก</div></td>
<td width="148">
<input type='checkbox' name='checkbox7' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">น้ำลายไหล</div></td>
<td width="148">
<input type='checkbox' name='checkbox8' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ตะกุยบริเวณปาก</div></td>
<td width="148">
<input type='checkbox' name='checkbox9' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">พบฟันหัก</div></td>
<td width="148">
<input type='checkbox' name='checkbox10' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ฟันมีคราบอาหารหรือหินปูนมาก</div></td>
<td width="148">
<input type='checkbox' name='checkbox11' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ฟันเปลี่ยนสี</div></td>
<td width="148">
<input type='checkbox' name='checkbox12' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">หน้าบวมและไวต่อการสัมผัส</div></td>
<td width="148">
<input type='checkbox' name='checkbox13' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ช่องปากมีกลิ่นเหม็น</div></td>
<td width="148">
<input type='checkbox' name='checkbox14' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ช่องปากมีสิ่งแปลกปลอมที่มีลักษณะกลม</div></td>
<td width="148">
<input type='checkbox' name='checkbox15' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ช่องปากมีสิ่งแปลกปลอมผิวขรุขระคล้ายดอกกะหล่ำ</div></td>
<td width="148">
<input type='checkbox' name='checkbox16' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">สุนัขมีอายุน้อยกว่าสองปี</div></td>
<td width="148">
<input type='checkbox' name='checkbox17' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">น้ำหนักลด</div></td>
<td width="148">
<input type='checkbox' name='checkbox18' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">อาเจียน</div></td>
<td width="148">
<input type='checkbox' name='checkbox19' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">อุจจาระผิดปกติ (ท้องเสีย ท้องผูก อุจจาระมีสีเทา)</div></td>
<td width="148">
<input type='checkbox' name='checkbox20' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">เจ็บบริเวณช่องท้องส่วนหน้า</div></td>
<td width="148">
<input type='checkbox' name='checkbox21' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ช่องท้องขยายใหญ่</div></td>
<td width="148">
<input type='checkbox' name='checkbox22' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">เยื่อตาขาวและเหงือกมีสีเหลือง</div></td>
<td width="148">
<input type='checkbox' name='checkbox23' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">กินน้ำและปัสสาวะมาก</div></td>
<td width="148">
<input type='checkbox' name='checkbox24' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">เลือดหยุดยากเมื่อเกิดบาดแผล</div></td>
<td width="148">
<input type='checkbox' name='checkbox25' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ชัก</div></td>
<td width="148">
<input type='checkbox' name='checkbox26' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">กระวนกระวาย</div></td>
<td width="148">
<input type='checkbox' name='checkbox27' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ท้องเสีย</div></td>
<td width="148">
<input type='checkbox' name='checkbox28' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ปวดท้อง</div></td>
<td width="148">
<input type='checkbox' name='checkbox29' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">หายใจเร็ว</div></td>
<td width="148">
<input type='checkbox' name='checkbox30' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">เหงือกซีด</div></td>
<td width="148">
<input type='checkbox' name='checkbox31' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">กระสับกระส่าย</div></td>
<td width="148">
<input type='checkbox' name='checkbox32' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ตื่นเต้น</div></td>
<td width="148">
<input type='checkbox' name='checkbox33' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ตัวแข็งเกร็ง</div></td>
<td width="148">
<input type='checkbox' name='checkbox34' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ปัสสาวะบ่อย</div></td>
<td width="148">
<input type='checkbox' name='checkbox35' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">อุณหภูมิร่างกายสูง</div></td>
<td width="148">
<input type='checkbox' name='checkbox36' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ปัสสาวะลดลงหรือไม่มี</div></td>
<td width="148">
<input type='checkbox' name='checkbox37' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">อ่อนแรง</div></td>
<td width="148">
<input type='checkbox' name='checkbox38' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ร่างกายซูบผอม</div></td>
<td width="148">
<input type='checkbox' name='checkbox39' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ผิวหนังและขนหยาบกร้าน</div></td>
<td width="148">
<input type='checkbox' name='checkbox40' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">เจ็บเวลาเดิน</div></td>
<td width="148">
<input type='checkbox' name='checkbox41' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
</table>
<input type="submit" name="Submit" value="Submit">
<input name="reset" type="reset" id="reset" value="Reset">
</center>
</form>
</body>
</html>
|
 |
 |
 |
 |
Date :
2009-06-06 21:52:06 |
By :
suzuhara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
จากที่เอา View Source ไป RUN ดู ปรากฏว่า มันห่างจริง ๆ ก็เลยตัด อันล่าง ๆ ออกไป ปรากฏว่า มันขึ้นไปชิดบนแล้ว แสดงว่า ปัญหา ต้องอยู่ที่ Table นี่แหละ
Code (็ธ?ศ)
<?php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>วินิจฉัยโรคสุนัขเบื้องต้น</title>
<meta http-equiv=Content-Type content="text/html; charset=tis-620">
</head>
<body style="margin:0px;padding:0px;vertical-align:top;">
<form name="form1" method="post" action="show_judge.php">
<table width="504" border="0" align="center" cellspacing=1 cellpadding=1>
<tr>
<td width="356" height="20"> <div align="left">ลักษณะของอาการ</div></td>
<td width="148"><div align="center">โปรดเลือกอาการที่เกิด</div></td>
</tr>
<tr>
<td width="356" height="20"><div align="left">กระสับกระส่ายเมื่อคลำบริเวณลำคอ</div></td>
<td width="148">
<input type='checkbox' name='checkbox1' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
<tr>
<td width="356" height="20"><div align="left">ซึม</div></td>
<td width="148">
<input type='checkbox' name='checkbox2' value=1></td>
</tr>
<input type='hidden' name='part' value='alimentarydb'>
</table>
<input type="submit" name="Submit" value="Submit">
<input name="reset" type="reset" id="reset" value="Reset">
</form>
</body>
</html>
?>
|
 |
 |
 |
 |
Date :
2009-06-07 09:14:07 |
By :
sirikulo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไฟล์อื่นก็ทำคล้ายๆแบบนี้แต่ไม่ยักกะห่างเหมือนไฟล์นี้เลย งงจริงๆเลยครับ
|
 |
 |
 |
 |
Date :
2009-06-08 11:26:18 |
By :
suzuhara |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สงสัยคงเป็นข้อมูลที่มันไป loop เอามา มันไปทำอะไรกับตาราง มั๊งครับ (เดาเอา) มันเลยทำให้ห่าง (ไม่ใช่ห่าน) แหะ แหะ
|
 |
 |
 |
 |
Date :
2009-06-09 09:41:40 |
By :
sirikulo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณ คหที่ 10 มากมายเลยครับ
|
 |
 |
 |
 |
Date :
2010-04-22 10:27:13 |
By :
Pee |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|