Q:

How to use data-toggle in a form action or window.location(PHP)?

I'm trying to let my page jump to a tab section. I can do it in this way:
<a data-toggle="tab" href="SectionB">Go to Add Event Tab</a>

then it will go to the Event Tab after I click it. 
Is there any way I can do it in < form action=" "> or window.location? So when I click on the submit button, it will go to the Add Event tab after insert data into database.
Code for tabs:
<div class="nav-tabs" role="navigation">
    <ul class="nav nav-tabs" data-tabs="tabs">
        <li class="active"><a data-toggle="tab" href="#SectionA">Home</a></li>
        <li><a data-toggle="tab" href="#SectionB">Add Event</a></li>
        <li><a data-toggle="tab" href="#SectionC">Add Top Story</a></li>                        
    </ul>
</div>     
<div id="my-tab-content" class="tab-content">
    <div class="tab-pane active" id="SectionA">
        <?php
        include_once('Welcome.html');
        ?>
    </div>
    <div class="tab-pane" id="SectionB">
        <?php
        include_once('AddEvent.php');
        ?>
    </div>
    <div class="tab-pane" id="SectionC">
        <?php
        include_once('AddTopStory.php');
        ?>
    </div>
    </div>
</div>

AddEvent.php form:
<div class="container">
    <form name="addevent" class="form" method="post" onsubmit="return validateEventForm()">
    <p><br>< button name="addevent" class="btn btn-sm btn-primary pull-right" type="submit">Add Event</button>
    </form>
</div> 

A:

You could add the following line to your validateEventForm() function:
$('a[href="#SectionB"]').tab('show');

