Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,028

HOME > PHP > PHP Forum > ช่วยแก้editdataform ให้หน่อบค่ะ คือตอนกรอกข้อมูลadd data ได้เก็บข้อมูลใน 1 หน้าเวป เป็น 2 ตารางแต่ละตาราง



 

ช่วยแก้editdataform ให้หน่อบค่ะ คือตอนกรอกข้อมูลadd data ได้เก็บข้อมูลใน 1 หน้าเวป เป็น 2 ตารางแต่ละตาราง

 



Topic : 005603

Guest




คือตอนกรอกข้อมูลadd data ได้เก็บข้อมูลใน1 หน้าเวป เป็น2 ตารางแต่ละตาราง save เข้าฐานข้อมูลของตัวเอง เช่นตาราง 1-->mother ตาราง2--> baby ก็ไม่มีปํญหาอะไร แต่ตอนสร้าง file editdataform เพือดึงข้อมูลมาแก้ ได้สร้างตาราง 2 ตารางแบบเดิมไว้ใน form form เดียว แล้วเขียน

<?
$care_no = $_GET['care_no'];
include ("connect.php");
$sql = "select * from motherhistory where care_no ='$care_no' ";
$query = mysql_query ($sql) or die('select error') ;
$row = mysql_fetch_array($query);

?>
ต่อด้วยตารางใสตัวแปรไว้
พอจบตาราง 1
<?
include ("connect.php");
$sql = "select * from babyhistory where care_no ='$care_no' ";
$query = mysql_query ($sql) or die('select error');
$row = mysql_fetch_array($query);

?>
ต่อด้วยตาราง2 ใส่ตัวแปรไว้
พอเปิดกับ IE แล้วมันจะload ช้ามากและขึ้นมาเพียงตารางแรกตารางเดียวค่ะ ไม่ทราบว่าจริงๆ ต้องเขียนอย่างไรค่ะ ช่วยหน่อยนะค่ะ ขอบคุณค่ะ


Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 26 ก.ย. 2548 22:02:03 By : sherry View : 2461 Reply : 4
 

 

No. 1

Guest


ดูจากโค๊ด ผมว่ามันก็ปกตินะ แต่เห็น include ("connect.php"); อยู่สองจุดเข้าใจว่าน่าจะเป็นไฟล์ที่ใช้เชื่อมต่อ ฐานข้อมูล ดังนั้น ใส่จุดเดียวก็พอครับ ไม่รู้เป็นเพราะเหตุนี้หรือเปล่าที่ทำให้มันช้า






Date : 27 ก.ย. 2548 00:02:09 By : ต้น
 


 

No. 2

Guest


ไฟล์ include ที่ใช้ในการติดต่อ DB ปกติให้ include ครั้งเดียวก็พอ หรือเพื่อเป็นการป้องกันผมจะใช้

include_once('connect.php');
Date : 27 ก.ย. 2548 03:07:49 By : intrnity
 

 

No. 3

Guest


ลองแก้ตามที่แนะนำแล้วตัด include.php เหลือที่เดียว แต่ก็ได้แค่ตารางแรกตารางเดียวแล้วเครื่องจะแฮงค์ค่ะ คิดว่าน่าจะเกิดจากcode ของตาราง 2 ไม่ถูกต้องเนื่องจากตอนเก็กข้อมูลใน addDatasave ได้แปลงข้อมูลเกี่ยวแบวันเกิด เข่น 12/ธ.ค. /13 ---> 1970-12/12ในฐานข้อมูล และตัวแปร APgar ให้เลือกเป็นตัวเลขในช่อง list menu
APgar 1,APgar 5,APgar 10 เก็บไว้ในตัวแปร APgar ในฐานขัอมูลโดยเชื่อมเป็น เช่น 10-10-10
พอตอน editdataform เลยเขียนให้ split ข้อมูลกลับมาให้ลงใน form เหมือนใน adddataform ค่ะ แต่พยายามแก้แล้วยังไม่ได้ กลุ้มใจมาก เลยขอcopy code มาให้ดู รบกวนช่วยแก้ให้ด้วยนะค่ะ ขอบคุณค่ะ

<meta http-equiv="Content-Type" content="text/html; charset=windows-874">

<?
$care_no = $_GET['care_no'];
include_once ("connect.php");
$sql = "select * from motherhistory where care_no ='$care_no' ";
$query = mysql_query ($sql) or die('select error') ;
$row = mysql_fetch_array($query);

?>
<html>
<head>
<title>Untitled Document</title>

<style type="text/css">
<!--
.style5 {
font-size: 22px;
font-weight: bold;
color: #4F2C7A;
}
.style7 {
font-size: 24px;
color: #7B03AF;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.style9 {
font-size: 14px;
font-weight: bold;
}
.style14 {font-size: 12px}
.style23 {
font-size: 18px;
color: #00006F;
font-weight: bold;
}
.style32 {font-size: 12px; font-weight: bold; }
.style34 {color: #0000FF}
.style35 {
font-size: 14px;
font-weight: bold;
}
.style36 {
font-family: "MS Sans Serif", "Microsoft Sans Serif", "MS Serif", Tahoma, Verdana, sans-serif;
font-size: 14px;
}
.style39 {color: #4F2C7A; font-weight: bold;}
.style40 {color: #5F287B; font-weight: bold;}
.style43 {font-size: 10}
.style45 {font-size: 10px; font-weight: bold; }
.style46 {font-size: 9px}
body,td,th {
font-family: MS Sans Serif, Microsoft Sans Serif, MS Serif, Tahoma, Verdana, sans-serif;
font-size: 18px;
}
-->
</style>
</font>


</head>

<body>
<div align="left"></div>
<form name="form1" method="post" action="fileEditDataSave.php">
<p align="center" class="style7 style1 style2"><strong>โครงการ CARE </strong></p>
<table width="620" height="400" border="1" align="center">
<tr bgcolor="#F59FFD">
<td class="style36"><div align="left" class="style14"><strong>CARE No. </strong></div></td>
<td colspan="2" class="style36"><input name="care_no" type="text" id="care_no" value= "<?=$row['care_no']?>" size="18" ></td>
</td>
<td class="style36"><div align="right" class="style14"><strong>SHP No. </strong></div></td>
<td colspan="2" class="style36"><input name="SHP_no" type="text" id="SHP_no" value="<?=$row['SHP_no']?>" size="25"></td>
</tr>
<tr bgcolor="#F59FFD">
<td colspan="6" class="style36"><span class="style39">&#3611;&#3619;&#3632;&#3623;&#3633;&#3605;&#3636;&#3588;&#3619;&#3629;&#3610;&#3588;&#3619;&#3633;&#3623; </span></td>
</tr>
<tr bgcolor="#EAB4FC">
<td colspan="6" class="style36"><span class="style39">&#3586;&#3657;&#3629;&#3617;&#3641;&#3621;&#3649;&#3617;&#3656;</span></td>
</tr>
<tr bgcolor="#FADFFD">
<td width="20%" height="25" class="style36"><strong>&#3594;&#3639;&#3656;&#3629;</strong></td>
<td width="16%" class="style36"><input name="m_name" type="text" id="m_name" value="<?= $row['m_name']?>" size="16"></td>
<td width="14%" class="style36"><p align="right"><strong>นามสกุล</strong></p> </td>
<td width="19%" class="style36"><input name="m_lastname" type="text" id="m_lastname" value="<?= $row['m_lastname']?>" size="18"></td>
<td width="8%" class="style36"><div align="right" class="style14"><strong>HN</strong></div></td>
<td width="23%" class="style36"><input name="m_HN" type="text" id="m_HN" value="<?= $row['m_HN'] ?>" size="15"></td>
</tr>
<tr bgcolor="#FADFFD">
<td class="style36"><strong>&#3629;&#3634;&#3618;&#3640;</strong></td>
<td class="style36"><input name="m_age" type="text" id="m_age" value="<?=$row['m_age']?>" size="16"></td>
<td class="style36"><strong>&#3611;&#3637; </strong></td>
<td class="style36"><strong>&#3588;&#3619;&#3619;&#3616;&#3660;ที่</strong></td>
<td colspan="2" class="style36"> <select name="G" id="G">
<?

for($i=1;$i<=10; $i++)
{?>
<option value = "<?=$i?>"<? if ($i =='$G'){echo"selected";}?>><?=$i?></option>
<?
}
?>



</select></td>
</tr>
<tr bgcolor="#FADFFD">
<td class="style36"><strong>&#3585;&#3634;&#3619;&#3613;&#3634;&#3585;ค&#3619;&#3619;&#3616;&#3660;</strong></td>
<td colspan="2" class="style36"><input name="ANC" type="radio" value="no" <? if ($row['ANC']="no" ){echo "checked";}?>> <strong>ไม่ได้ฝาก
<input name="ANC" type="radio" value="yes" <? if($row['ANC']="yes"){echo "checked";}?>>
ฝาก</strong></td><td class="style36"><strong>&#3626;&#3606;&#3634;&#3609;&#3607;&#3637;&#3656;</strong></td>
<td colspan="2" class="style36"><input name="ANC_place" type="text" id="ANC_place" value="<?= $row['ANC_place']?>"></td>
</tr>
<tr bgcolor="#FADFFD">
<td class="style36"><strong>&#3636;&#3623;&#3636;&#3608;&#3637;&#3585;&#3634;&#3619;&#3588;&#3621;&#3629;&#3604;</strong></td>
<td colspan="2" class="style36"><select name="labour" id="labour">
<?
$ShowLabour = array (' normal Labour','C/S','V/E','F/E');
for($i=0;$i<=3; $i++)
{?>
<option value= "<?=$ShowLabour[$i]?>"<? if ($ShowLabour [$i] == '$labour'){echo"selected";}?>><?=$ShowLabour [$i]?></option>
<?
}
?>
</select></td>
<td class="style36"><strong>indication</strong></td>
<td colspan="2" class="style36"><input name="indication" type="text" id="indication" value="<?= $row['indication']?>"></td>
</tr>
<tr bgcolor="#FADFFD">
<td class="style36"><strong>&#3609;&#3657;&#3635;&#3588;&#3619;&#3656;&#3635;</strong></td>
<td colspan="2" class="style36"><select name="AF" id="AF">
<?
$ShowAF = array ('แตกเอง','เจาะ','รั่ว');
for($i=0;$i<=2; $i++)
{
?>
<option value= "<?=$ShowAF[$i]?>"<? if($ShowAF[$i]=='$AF'){echo"selected";}?>><?=$ShowAF [$i]?></option>
<?
}
?>
</select></td>
<td class="style36"><strong>&#3585;&#3656;&#3629;&#3609;&#3588;&#3621;&#3629;&#3604; (เวลา)</strong></td>
<td colspan="2" class="style36"><input name="AF_duration" type="text" id="AF_duration" value="<?=$row['AF_duration']?>">
<strong> ชั่วโมง</strong></td>
</tr>
<tr bgcolor="#FADFFD">
<td class="style36"><strong><span class="style46">AZT</span>&#3585;&#3656;&#3629;&#3609;&#3588;&#3621;&#3629;&#3604; </strong></td>
<td colspan="2" class="style36"> <strong>
<input name="pre_AZT" type="radio" value="yes" <? if($row['pre_AZT']="yes"){echo "checked";}?>>
ได้
<input name="pre_AZT" type="radio" value="no" <? if($row['pre_AZT']="no"){echo "checked";}?>>
ไม่ได้</strong></td>
<td class="style36"><strong>&#3619;&#3632;&#3618;&#3632;&#3648;&#3623;&#3621;&#3634;</strong></td>
<td class="style36"><select name="duration_p_AZT" id="duration_p_AZT">
<?
$ShowDurationAZT = array('<4 wk','>=4 wk');
for($i=0;$i<=1; $i++)
{?>
<option value= "<?=$ShowDurationAZT [$i]?>"<? if($ShowDurationAZT [$i]=='$duration_p_AZT'){echo"selected";}?>><?=$ShowDurationAZT [$i]?></option>
<?
}
?>

</select></td>
<td class="style36"><strong>สัปดาห์</strong></td>
</tr>
<tr bgcolor="#FADFFD">
<td class="style36"><strong>&#3585;&#3636;&#3609;&#3618;&#3634;&#3626;&#3617;&#3656;&#3635;&#3648;&#3626;&#3617;&#3629;</strong></td>
<td colspan="2" class="style36"><input name="m_adherance" type="radio" value="adherance " <? if($row['m_adherance']="adherance"){echo "checked";}?>>
<strong>&#3626;&#3617;&#3656;&#3635;&#3648;&#3626;&#3617;&#3629;
<input name="m_adherance" type="radio" value="not_adherance " <? if($row['m_adherance']="not_adherance"){echo "checked";}?>>
ไม่&#3626;&#3617;&#3656;&#3635;&#3648;&#3626;&#3617;&#3629;</strong></td>
<td class="style36"><strong>&#3636;&#3629;&#3634;&#3585;&#3634;&#3619;&#3586;&#3657;&#3634;&#3591;&#3648;&#3588;&#3637;&#3618;&#3591;</strong></td>
<td colspan="2" class="style36"><input name="m_SE" type="text" id="m_SE" value="<?= $row['m_SE']?>" size="25"></td>
</tr>
<tr bgcolor="#FADFFD">
<td class="style36"><strong><span class="style46">AZT</span>ตอน&#3588;&#3621;&#3629;&#3604; </strong></td>
<td colspan="2" class="style36"><strong>
<strong>
<input name="L_AZT" type="radio" value="yes" <? if($row['L_AZT']="yes"){echo "checked";}?>>
ได้
<input name="L_AZT" type="radio" value="no" <? if($row['L_AZT']="no"){echo "checked";}?>>
ไม่ได้</strong></strong></td>
<td class="style36"><strong><span class="style43">&#3660;NVP </span>&#3619;&#3632;&#3627;&#3623;&#3656;&#3634;&#3591;&#3588;&#3621;&#3629;&#3604; </strong></td>
<td colspan="2" class="style36"><strong>
<strong>
<input name="L_NVP" type="radio" value="yes" <? if($row['L_NVP']="yes"){echo "checked";}?>>
ได้
<input name="L_NVP" type="radio" value="no" <? if($row['L_NVP']="no"){echo "checked";}?>>
ไม่ได้</strong></strong></td>
</tr>
<tr bgcolor="#F5CEFB">
<td colspan="6" bgcolor="#EDA3F8" class="style36"><span class="style40">&#3586;&#3657;&#3629;&#3617;&#3641;&#3621;&#3614;&#3656;&#3629;</span></td>
</tr>
<tr bgcolor="#F8D8FC">
<td class="style36"><strong>&#3629;&#3634;&#3618;&#3640; </strong></td>
<td class="style36"><input name="f_age" type="text" id="f_age" value="<?=$row['f_age']?>" size="16"></td>
<td colspan="4" class="style36"><strong>&#3611;&#3637;</strong></td>
</tr>
<tr bgcolor="#F8D8FC">
<td class="style36"><strong>&#3619;&#3641;&#3657;&#3612;&#3621;&#3648;&#3621;&#3639;&#3629;&#3604;&#3649;&#3617;&#3656;</strong></td>
<td colspan="5" class="style36"><input name="f_know_L" type="radio" value="known" <? if($row['f_know_L']="known"){echo "checked" ;}?>>
<span class="style45"> รู้</span><strong>
<input name="f_know_L" type="radio" value="unknown" <? if($row['f_know_L']="unknown"){echo "checked" ;}?>>
ไม่รู้</strong></td>
</tr>
<tr bgcolor="#F8D8FC">
<td class="style36"><strong>&#3612;&#3621;&#3648;&#3621;&#3639;&#3629;&#3604;H<span class="style46">IV&#3614;</span>&#3656;&#3629;</strong></td>
<td colspan="5" class="style36"> <input name="f_HIV" type="radio" value="positive" <? if($row['f_HIV']="positive"){echo "checked" ;}?>>
<strong>positive
<input name="f_B20" type="radio" value="negative" <? if($row['f_B20]="negative"){echo "checked";}?>>
negative
<input name="f_B20" type="radio" value="not test" <? if($row['f_B20]="not test"){echo "checked" ;}?>>
ไม่ได้ตรวจ
</strong></td>

</tr>

</table>

<p>
<?

$sql = "select * from babyhistory where care_no ='$care_no' ";
$query = mysql_query ($sql) or die('select error');
$row = mysql_fetch_array($query);



?> &nbsp;

</p>

<table width="737" height="340" border="1" align="center">
<tr bgcolor="#A2B3F4">
<td height="27" colspan="6"><p class="style23">ข้อมูลลูก</p> </td>
</tr>
<tr bgcolor="#D3DEFA">
<td width="14%" height="30" class="style35">ชื่อ
<select name="baby" id="baby">
<?
$ShowBaby = array (' เด็กชาย','เด็กหญิง');
for($i=0;$i<=1; $i++)
{?>
<option value = "<?=$ShowBaby [$i]?>"<? if($ShowBaby [$i]=='$baby'){echo"selected";}?>><?=$ShowBaby [$i]?></option>
<?
}
?>

</select> </td>
<td width="25%">
<div align="left">
<input name="b_name" type="text" id="b_name" value="<?= $row['b_name']?>" size="24">
</div></td><td width="13%"><div align="right"><span class="style35">นามสกุล</span> </div></td>
<td><div align="left">
<input name="b_lastname" type="text" id="b_lastname" value="<?= $row['b_lastname']?>" size="20">
</div>
<span class="style35"> </span></td>
<td><div align="right"><span class="style35">HN</span></div></td>
<td><input name="b_HN" type="text" id="b_HN" value="<?= $row['b_HN']?>" size="15"></td>
</tr>
<tr bgcolor="#D3DEFA">
<td height="28" class="style35">เกิดวันที่</td>
<td>
<?
$data =split ("-",$row ['birthday']);
$bd_day =$data[2];
$bd_month =$data[1];
$bd_year = $data[0] +543 ;
?>
<select name="bd_day" id="bd_day">
<? for ($i=1; $i<=31; $i++) { ?>
<option value="<?=$i?>"<? if ($i='$bd_day'){echo "selected";}?>><?=$i?></option>
<? } ?>
</select>
<select name="bd_month" id="bd_month">
<?
$showmonth = array ( "ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.");
for($i=0;$i<=11;$i++){
?>
<option value="<?=$i+1?>"<? if($i +1=='$bd_month'){echo "selected";}?>><?=$showmonth[$i]?></option>
<? } ?>

</select>
<select name="bd_year" id="bd_year">
<?
for ($i=2000; $i<=date("Y");$i++)
{?>
<option value =<?=$i?><? if ($i ='$bd_year' ){echo "selected";}?>><?=$i+543?></option>
<?
}
?>
</select></td>
<td><div align="right"><span class="style35">เวลา</span></div></td>
<td width="23%"><input name="bd_time" type="text" id="bd_time" value="<?= $row['bd_time']?>" size="15">
<span class="style35">น.</span> </td>
<td width="12%"><div align="right"><strong class="style35">น้ำหนักแรกเกิด</strong></div></td>
<td width="13%"><span class="style35">
<input name="birthweight" type="text" id="birthweight" value="<?= $row['birthweight']?>" size="10">
<span class="style14">กรัม</span></span></td>
</tr>
<tr bgcolor="#D3DEFA">
<td height="30" class="style35">APGAR </td>

<td>
<?
$showapgar = split ("-", $row['apgar']);
$apgar1 =$showapgar [0];
$apgar5 =$showapgar[1];
$apgar10 =$showapgar[2];
?>

<select name="apgar1" id="apgar1">

<? for ($i=0; $i<=10; $i++) { ?>
<option value="<?=$i?>"<? if ($i ='$apgar1' ){echo "selected";}?>><?=$i?></option>
<? } ?>

</select>
<select name="apgar5" id="apgar5">
<? for ($i=0; $i<=10; $i++) { ?>
<option value="<?=$i?>"<? if ($i ='$apgar5'){echo "selected";}?>><?=$i?></option>
<? } ?>
</select>
<select name="apgar10" id="apgar10">
<? for ($i=0; $i<=10; $i++) { ?>
<option value="<?=$i?>"<? if ($i ='$apgar10' ){echo "selected";}?>><?=$i?></option>
<? } ?>
</select></td>
<td class="style35"><div align="right" class="style14">complication</div></td>
<td><input name="complication" type="radio" value="yes" <? if($row['complication']="yes"){echo "checked" ;}?>>
<span class="style35"> มี</span>
<input name="complication" type="radio" value="no" <? if($row['complication']="no"){echo "checked" ;}?>>
<span class="style9">ไม่มี</span></td>
<td class="style35"><div align="right"><strong>ระบุ</strong></div></td>
<td><input name="complication_detail" type="text" id="complication_detail" value="<?= $row[ 'complication_detail' ] ?>" size="15"></td>
</tr>
<tr bgcolor="#D3DEFA">
<td height="27" class="style35">NVP syr </td>
<td colspan="5"><span class="style35">
<input name="b_NVP" type="radio" value="yes"<? if($row['b_NVP']="yes"){echo "checked" ;}?> >
ได้
<input name="b_NVP" type="radio" value="no" <? if($row['b_NVP']="no"){echo "checked" ;}?>>
ไม่ได้</span></td>
</tr>
<tr bgcolor="#D3DEFA">
<td height="29" class="style35">AZT syr </td>
<td><input name="b_AZT" type="radio" value="1wk" <? if($row['b_AZT']="1wk"){echo "checked" ;}?>>
<span class="style32">1 wk</span>
<input name="b_AZT" type="radio" value="6wk" <? if($row['b_AZT']="6wk"){echo "checked" ;}?> >
<span class="style35"><strong> <span class="style14">6</span> wk </strong></span></td>
<td class="style35"><div align="right">เริ่มวันที่</div></td>


<td>
<?
$showdata =split ("-",$row ["$b_AZT_startdate"]);
$$b_AZT_day =$showdata [2];
$b_AZT_month =$showdata [1];
$b_AZT_year =$showdata [0] +543 ;
?>
<select name="b_AZT_day" id="b_AZT_day">
<? for ($i=1; $i<=31; $i++) { ?>
<option value="<?=$i?>"<? if ($i ='$b_AZT_day' ){echo "selected";}?>><?=$i?></option>
<? } ?>
</select>
<select name="b_AZT_month" id="b_AZT_month">
<?
$showmonth = array ( "ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.");
for($i=0;$i<=11;$i++){
?>
<option value="<?=$i+1?>"<? if ($i+1=='$b_AZT_month' ){echo "selected";}?>><?=$showmonth[$i]?></option>
<? } ?>
</select>
<select name="b_AZT_year" id="b_AZT_year">
<?
for ($i=2000; $i<=date("Y");$i++)
{?>
<option value =<?=$i?><? if ($i ='$b_AZT_year' ){echo "selected";}?>><?=$i+543?></option>
<?
}
?>
</select></td>
<td class="style35"><div align="right">เวลา</div></td>
<td><input name="b_AZT_time" type="text" id="b_AZT_time" value="<?=$row['b_AZT_time']?>" size="10">
<span class="style35">น. </span> </td>
</tr>
<tr bgcolor="#D3DEFA">
<td height="26" class="style35">กินยาสม่ำเสมอ</td>
<td><input name="b_adherance" type="text" id="b_adherance" value="<?= $row['b_adherance']?>"></td>
<td class="style35"><div align="right">ผลข้างเคียง</div></td>
<td><input name="b_SE" type="text" id="b_SE" value="<?= $row['b_SE']?>"></td>
<td class="style35"><div align="right"><strong>ระบุ</strong></div></td>
<td><input name="b_SE_detail" type="text" id="b_SE_detail" value="<?=$row['b_SE_detail']?>" size="15"></td>
</tr>
<tr bgcolor="#D3DEFA">
<td height="27" colspan="2" class="style35"> <span class="style14">ผลตรวจ Anti-HIV 12 Mo </span></td>
<td colspan="4"><input name="b_lab_12m" type="text" id="b_lab_12m" value="<?= $row['b_lab_12m']?>"></td>
</tr>
<tr bgcolor="#D3DEFA">
<td height="25" colspan="2" class="style35"> <span class="style14">ผลตรวจ Anti-HIV 18 Mo </span></td>
<td colspan="4"><input name="b_lab_18m" type="text" id="b_lab_18m" value="<?= $row['b_lab_18m']?>"></td>
</tr>
<tr bordercolor="#C4D2E2" bgcolor="#ADC1F5">
<td height="26" colspan="2" class="style9 style34">การวินิจฉัย </td>
<td colspan="4"><span class="style34">
<input name="b_diag" type="text" id="b_diag" value="<?= $row['b_diag']?>">
</span></td>
</tr>
<tr bgcolor="#7597F0">
<td height="39" colspan="6" class="style35"><div align="center">
<input name="button" type="submit" class="style5" id="button2" value="บันทึก">
</div></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
</form>



Date : 29 ก.ย. 2548 00:06:35 By : sherry
 


 

No. 4

Guest


เอ....

<?
$care_no = $_GET['care_no'];
include ("connect.php");
$sql = "select * from motherhistory where care_no ='$care_no' ";
$query = mysql_query ($sql) or die('select error') ;
$row = mysql_fetch_array($query);

?>
ต่อด้วยตารางใสตัวแปรไว้
พอจบตาราง 1
<?
$sql = "select * from babyhistory where care_no ='$care_no' ";
$query = mysql_query ($sql) or die('select error');
$row = mysql_fetch_array($query);

?>

ตรงนี้คุณลองเปลี่ยนตัวแปรดูหน่อยครับ ลองเปลี่ยนให้มันต่างกันดูครับ เช่น $sql1 กะ $sql2 , $query1 กะ $query2, $row1 กะ $row2 เพราะมันอยู่ในเพจเดียวกัน อาจจะเกิด error ได้ ผมลองเดาดูนะครับ
Date : 29 ก.ย. 2548 19:38:17 By : intrinity
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : ช่วยแก้editdataform ให้หน่อบค่ะ คือตอนกรอกข้อมูลadd data ได้เก็บข้อมูลใน 1 หน้าเวป เป็น 2 ตารางแต่ละตาราง
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 02
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่