如果我点击此按钮,
<input href="#medicine-patient1<?php echo $k; ?>" type='submit' name='form_edit<?php echo $k; ?>' class='medicine medicine-btn someClass' value='' title="Medicine" />
显示一个弹出窗体,`
<div style="display:none;">
<div id="medicine-patient1<?php echo $k; ?>" class="medicine-patient-pop">
<form name="medicine1<?php echo $k; ?>" id="medicine1<?php echo $k; ?>" method="post" action="edit_medicine_dosage.php">
<div class="patient-form">
<h1>Change medicine dosage</h1>
<?php
$group1 = getgroupdataId($db);
$group_id = getgroupId($db,$group);
$patgrp_id = $group_id['groupid'];
//echo $group;
//echo $k;
?>
<input type="hidden" name="patient_username" value="<?=$usernam?>">
<label>Group:</label>
<select name="group" id="group" onchange="list_group1(this.value,<?php echo $k; ?>)" class="group-select">
<option value="<?php echo $group ; ?>" > <?php echo $group ; ?></option>
<?php
for($i = 0; $i < count($group1); $i++) {
$grp = $group1[$i];
$grp_name = $grp['groupname'];
$grp_id = $grp['groupid'];
echo '<option value="'.$grp_id.'">'.$grp_name.'</option>';
}
?>
</select>
<br clear="all" />
<div id="hidden<?php echo $k; ?>">
<?php
$getpatdetails = getUserdataId($db, $pid);
$insulin_name = $getpatdetails["insulin_name"];
$tablet_name = $getpatdetails["tablet_name"];
$current_dosins_values = $getpatdetails["current_dosins_values"];
$current_dostab_values = $getpatdetails["current_dostab_values"];
$insln=explode('#', $insulin_name);
$current_dosins = explode("_",$current_dosins_values);
$current_dostab = explode("_",$current_dostab_values);
//echo $insln[0];
$ins_name = mysql_query("SELECT * FROM insulin WHERE groupid='$patgrp_id'") or die(mysql_error());
$tab_name= mysql_query("SELECT * FROM tablet WHERE groupid='$patgrp_id'") or die(mysql_error());
$l=1;
while($row2=mysql_fetch_array($ins_name))
{
$cur_ins1 = explode(",",$current_dosins[$l-1]);
?>
<label>Name of Insulin <?=$l?>:</label>
<select name="ins_name[<?=$l?>]" id="dropdown<?=$l?>" class="group-select" onChange="return getSelectedField2()" >
<option value="<?php echo $insln[$l-1]; ?>"><?php echo $insln[$l-1]; ?></option>
<?php
if($admin_type=='phar')
{
$pins=mysql_query("SELECT insulinname FROM pharinsulin WHERE adm_id='$admin_id'");
while($row=mysql_fetch_array($pins))
{
echo '<option value="'.$row['insulinname'].'">'.$row['insulinname'].'</option>';
}
}
else
{
$insulin=$row2['insulin'];
$ins_data = explode("#",$insulin);
foreach($ins_data as $key1=>$ins)
{
echo '<option value="'.$ins.'">'.$ins.'</option>';
}
}
?>
</select>
<br clear="all" />
<label>
<input type="text" id="insulin<?=$l?>" name="insulin[<?=$l?>]" value="Change Dosage" disabled style="width:200px; height: 35px; color:#5e5e5e; background: none; border:0px; margin: -5px 0px 0px -5px;" />
</label>
<select name="ins_morn_dos[insulin<?=$l?>]" class="dosage-select" >
<option value="<?=$cur_ins1['0']?>"><?=$cur_ins1['0']?></option>
<?php
for ($i = 0; $i < 37; $i++) {
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
</select>
<select name="ins_noon_dos[insulin<?=$l?>]" class="dosage-select">
<option value="<?=$cur_ins1['1']?>"><?=$cur_ins1['1']?></option>
<?php
for ($i = 0; $i < 37; $i++) {
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
</select>
<select name="ins_even_dos[insulin<?=$l?>]" class="dosage-select">
<option value="<?=$cur_ins1['2']?>"><?=$cur_ins1['2']?></option>
<?php
for ($i = 0; $i < 37; $i++) {
echo '<option value="'.$i.'">'.$i.'</option>';
}
?>
</select>
<br clear="all" />
请不要对查询和所有问题感到恼火。问题是,如果k = 1的值,我无法提交表格。除了k = 1之外,其他任何工作都是正常的。查询工作正常。请使用不要被php代码搞糊涂。