我有一个名为MemberArea.php的页面,使用bootstrap选项卡根据div id更改其内容。
<div id="tabs-1" class="tab-pane fade in active">
<div class="tabbable tabs-left">
<br />
<ul class="nav nav-tabs" id="maincontent" role="tablist">
<li class="active"><a data-toggle="tab" href="#tabs-5" role="tab">Basic Information</a></li>
<li><a data-toggle="tab" href="#tabs-6" role="tab">View Team</a></li>
</ul>
<div class="tab-content">
<div id="tabs-5" class="tab-pane active">
<?php include("information.php"); ?>
</div>
<div id="tabs-6" class="tab-pane">
<?php include("viewTeam.php"); ?>
</div>
<div id="tabs-14" class="tab-pane">
<?php include("EditSinging.php"); ?>
</div>
<div id="tabs-15" class="tab-pane">
<?php include("EditSpeech.php"); ?>
</div>
<div id="tabs-16" class="tab-pane">
<?php include("EditStory.php"); ?>
</div>
</div>
</div>
在ViewTeam中,显示所有注册的团队
<?php
$query="select * from etj12singing where etj12id=$id AND etj12Pay ='Yes' ";
$result =mysql_query($query);
while($row= mysql_fetch_array($result))
{
$SIidnumber=$row['etj12idnum'];
$SIidtype = $row['etj12idtype'];
$SIfullName = $row['etj12fullname'];
$SIgender = $row['etj12gender'];
$SIemail = $row['etj12email'];
$SIphone = $row['etj12phone'];
$SIvege = $row['etj12vege'];
$SIpay = $row['etj12Pay'];
$SIidsinging = $row['etj12idsinging'];
?>
<tr>
<td><?php echo $SIidnumber; ?></td>
<td><?php echo $SIidtype; ?></td>
<td><?php echo $SIfullName; ?></td>
<td><?php echo $SIgender; ?></td>
<td><?php echo $SIemail; ?></td>
<td><?php echo $SIphone; ?></td>
<td><?php echo $SIvege; ?></td>
<td><?php echo $SIpay; ?></td>
<td>
<a data-toggle="tab" href="?idSIE=<?php echo $SIidsinging; ?>#tabs-14" role="tab">
<input type="submit" value="Edit" class="btn-warning"/>
</td>
</tr>
我的问题是我不能传递值tab -14(editsing .php)
这是我如何得到的值在tab -14(editsing .php)
$idsinging=$_GET['idSIE'];
以下是editsing .php中的代码PHP:
$idinst = $_SESSION['id'];
$idsinging=$_POST['idSIE'];
$query = "SELECT * FROM etj12singing WHERE etj12id=$idinst AND etj12idsinging=$idsinging";
$result = mysql_query($query);
if($row=mysql_fetch_array($result))
{
$idNum = $row['etj12idnum'];
$idtype = $row['etj12idtype'];
$fullname = $row['etj12fullname'];
$gender = $row['etj12gender'];
$email = $row['etj12email'];
$phone = $row['etj12phone'];
$vege = $row['etj12vege'];
}
下面是编辑从上面的查询中得到的值的表单
<table style="width:100%;height:auto;border-spacing:10px;border-collapse:separate">
<tr>
<td>Id Number<br/>
<span style="font-style:italic;">(Nomor Identitas)</span>
</td>
<td>
<input type="text" id="IdNumber" name="IdNumber" value="<?php echo $idNum; ?>" class="textbox_register"/>
<input type="hidden" name="idSIC" value="<?php echo $idsinging; ?>" class="textbox_register"/>
<br/><label id="err1" class="error"></label>
</td>
</tr></table>
在你的ViewTeam文件中查询:
$query="select * from etj12singing where etj12id=$id AND etj12Pay ='Yes' ";
这个内容($id)没有在文件中定义;您必须给字符串(id)一个值。所以你的查询返回空结果。
我想这就是你的问题所在。