Answers for "div hide in php"

PHP
0

div hide in php

$id=$this->session->userdata('user_id');
<ul class="nav nav-pills">
                  <?php if(isset($id)){ ?>
                    <style type="text/css">#settings{
display:none;
}  #activity{
display:inline-block;
}</style>
                  <li class="nav-item"><a class="nav-link active" href="#activity" data-toggle="tab">Activity</a></li>
                <?php  }else{ ?>
                  <style type="text/css">#activity{
display:none;
} #settings{
display:inline-block;
}</style>
                  <li class="nav-item"><a class="nav-link active" href="#settings" data-toggle="tab">Settings</a></li>
                <?php } ?>
                </ul>
                  
                  <div class="tab-pane" id="activity">Activity</div>
                  <div class="tab-pane" id="settings">Settings</div>
Posted by: Guest on June-18-2021

Browse Popular Code Answers by Language