0

I have a page called MemberArea.php that use bootstrap tab to change its content according to 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>

In ViewTeam, it's to display all registered team

<?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>

My problem is I cannot pass the value to tabs-14(EditSinging.php)

Here is how i get the value in tabs-14(EditSinging.php)

$idsinging=$_GET['idSIE'];

UPDATE
Here is the code in 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'];
}

Below is the form to edit the value that i got from the query above

<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>
  • Do you see `idSIE=` in the URL? Can your show the code for EditSinging.php since that's the one you reckon you've got a problem with? – Jonnix Sep 30 '15 at 14:59
  • @JonStirling No, I don't see that. it move to EditSinging.php but its url still MemberArea.php it doesn't changed at all. Ok i will post it – david Only Sep 30 '15 at 15:04
  • That's your issue then. If it's not in the URL, then it's not in `$GET`. A link is wrong, or you don't have access to that ID. – Jonnix Sep 30 '15 at 15:05
  • Do you know how to solve it? Have been struggling for a few days – david Only Sep 30 '15 at 15:14
  • You need whatever link you use to add it to the link. You have it in your ViewTeam view, so do you have links to the relevant page from elsewhere? If not, when you hover over the link, is the id in there? – Jonnix Sep 30 '15 at 15:15
  • when i hover the link, it show "MemberArea.php?idSIE=35#tabs-14". But when I clicked it, the url become just "MemberArea.php" in address bar – david Only Sep 30 '15 at 15:28
  • Sounds like you have some sort of redirect going on in that case. – Jonnix Sep 30 '15 at 15:29
  • I am not sure of it's redirect. But when i hover other tab it shows the link like "MemberArea.php#tabs-10" but after I click it the url shown in Address bar only "MemberArea.php". I think Bootstrap cause that? – david Only Sep 30 '15 at 15:36
  • Its not a redirect. WIth bootstrap tabs you can click from tab to tab and the page doesnt refresh, a type of `No Page load` - he might have to use jQuery to pass the value to the page/browser + reload once he clicks on the second tab. – yardie Sep 30 '15 at 15:56
  • @andre3wap Okay, Do u have any solution for this problem? – david Only Sep 30 '15 at 15:58
  • @David, first thing first; Verify that you closed the anchor tag `` after your edit button in `ViewTeam.php` and in your `EditSinging.php` you should have `$idsinging=$_GET['idSIE'];` not `$idsinging=$_POST['idSIE'];` make those changes, give it a try again. If it still doesnt work I will POST my jQuery approach. – yardie Sep 30 '15 at 17:36

1 Answers1

-1

In your ViewTeam file the query:

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

this content ($id) witch not defined in file; you must give the string (id) a value. so your query return null results.

I think this is the problem you have.