well I have this php code:
PHP Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>show results</title>
<link type="text/css" href="css/jquery-ui.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.accordion.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.all.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.autocomplete.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.base.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.button.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.core.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.datepicker.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.dialog.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.progressbar.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.resizable.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.selectable.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.slider.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.tabs.css" rel="stylesheet" />
<link type="text/css" href="css/jquery.ui.theme.css" rel="stylesheet" />
<link type="text/css" href="css/jquery-ui.css" rel="stylesheet" />
<link type="text/css" href="css/jquery-ui-1.8.17.custom.css" rel="stylesheet" />
<link type="text/css" href="css/page.css" rel="stylesheet" />
<link type="text/css" href="css/qunit.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript">
    // Tabs
    // Accordion
                $("#accordion").accordion({ header: "h4" });
    // Button
                $("#b").button({link: "a"});
<style type="text/css">
body{ margin:0;}
.ui-tabs { direction: rtl; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected,
.ui-tabs .ui-tabs-nav li.ui-state-default {float: right;}
.ui-tabs .ui-tabs-nav li a { float: right; }

$username $_SESSION['username'];
    if (isset(
//insert welcome user 
            <div align='right' style='display:block'>welcome, "
.$username." ";
//insert tabs for program
            <div id='b'><h4><a href='logout.php'  >log out</a></h4></div>
        <div id='tabs'>
            <ul dir='rtl'>
                <li><a href='#tabs-1'>results</a></li>
                <li><a href='#tabs-2'>results1</a></li>
                <li><a href='#tabs-3'>results2</a></li>
                <li><a href='#tabs-4'>results3</a></li>
                <li><a href='#tabs-5'>results4</a></li>
                <li><a href='#tabs-6'>results5</a></li>
                <li><a href='#tabs-7'>results6</a></li>
                <li style='float:left;'><a href='#tabs-8'>personal profile</a></li>
                                <div id='tabs-1'> this is for show results</div>
                                <div id='tabs-2'> this is for show results1</div>
                                <div id='tabs-3'> this is for show results2</div>
                                <div id='tabs-4'> this is for show results3</div>
                                <div id='tabs-5'> this is for show results4</div>
                                <div id='tabs-6'> this is for show results5</div>
                                <div id='tabs-7'> this is for show results6</div>
"<h3 dir='rtl'> sorry you're not log in <a href='index.php'>log in!</a></h3>");
well I use tabs for show content here inside the id = "tabs-..." so what I should do to make query with mysql but with in the conditional statement, so then it will show out results inside id="tabs-..." that handle the result of each query?
I know it seems not clear but I hope if you figure out what I need here to help me to do different query and keep the session handle everything so each user has different result from the other user even if the query are the same.