0

我有一个名为 MemberArea.php 的页面,它使用引导选项卡根据 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>

我的问题是我无法将值传递给 tabs-14(EditSinging.php)

这是我在 tabs-14(EditSinging.php) 中获取值的方法

$idsinging=$_GET['idSIE'];

更新
这是 EditSinging.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>
4

1 回答 1

-1

在您的 ViewTeam 文件中,查询:

$query="select * from etj12singing where etj12id=$id  AND etj12Pay ='Yes' ";

此内容($id)未在文件中定义;你必须给字符串(id)一个值。所以你的查询返回空结果。

我认为这是您遇到的问题。

于 2015-09-30T15:15:24.300 回答