Sophia_1 0 Junior Poster in Training

Hi everyone...have this table as header and i want to display it in all 2 tabs ie Quarter tabs.Currently, the header detail is only displayed in Quater 1 tab...and eventhough i've use include (header.php) in Quarter 2 tab, the header detail is not displayed.Please advise how to display the same header in Quarter 2 as well. Below are the codes. Thanks alot.

header.php

<?php
session_start();

    $_SESSION['Userid']; // it will print the userid value


$_SESSION['Username']; // it will print the userid value

?>
<html>
<head>
<title>Database</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<form name="<?php echo $_SERVER['PHP_SELF']?>" method="post" action="">
<div id="header">

     <?php

$connection = mysql_connect("localhost","pqa","") or die("Database connection failed!<br>");
$result=mysql_select_db("pq") or die("Database could not be selected!");

    $Targetid =0;


if (isset($_GET['Targetid'])) {
$Targetid = $_GET['Targetid'];
$_SESSION['Targetid']=$Targetid;

$query="Select * from general_ipd where Userid='".$_SESSION['Userid']."' and Targetid= '$Targetid'";//'".$_POST['Targetid']."'";
$result=mysql_query($query);
if($row=mysql_fetch_array($result))

{

echo "<input type='hidden' name='hidden' value='".$row['Userid']."'><br>";
echo "KRA:<input type='text' name='KRA' value='".$row['Kra']."'><br>";
echo "KPI:<input type='text' name='KPI' value='".$row['Kpi']."'><br>";
echo "Target:<input type='text' name='Target' value='".$row['Target']."'><br>";
echo "<input type='hidden' name='hidden' value='".$Targetid."'><br>";

}




}

?>
</div>
<div id="navigation">

    <ul>


<li><a href="#ipdprogress1.php">Quarter 1</a></li>
<li><a href="#ipdprogress2.php?">Quarter 2</a></li>
</ul>

</div>
</form>
</body>
</html>

progress2.php

<?php include ('config.php');?>
<?php include('header.php');?>
<div id="container">
<div id="content">
<div id="contentleft">
<?php
error_reporting(E_ALL ^ E_NOTICE);
$_SESSION['Targetid'];
$_SESSION["Progressid"];
$conn = mysql_connect("localhost","pqa","");
mysql_select_db("pq",$conn);

if(count($_POST)>0) {

mysql_query("UPDATE progress set Quanprogress2='" . $_POST["Quanprogress2"] . "', Qualprogress2='" . $_POST["Qualprogress2"] . "',
WHERE Progressid='" . $_SESSION["Progressid"] . "'");
$message = "Record Modified Successfully";

}

$result = mysql_query("SELECT * FROM progress WHERE Progressid='" . $_SESSION["Progressid"] . "'");
$row= mysql_fetch_array($result);
?>
<html>
<head>
<title>Add New User</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<form name="<?php echo $_SERVER['PHP_SELF']?>" method="post" action="">
<div style="width:500px;">
<div class="message"><?php if(isset($message)) { echo $message; } ?></div>
<div align="right" style="padding-bottom:5px;"><a href="list_progress2.php" class="link"><img alt='List' title='List' src='images/list.png' width='15px' height='15px'/> List Progress</a></div>
<p><b>1.Target</b></p>
a.i.Quantitative Progress (e.g. average,numerical,%,sum): <input type="hidden" name="Progressid" class="txtField" value="<?php echo $row['Progressid']; ?>"><input type="text" name="Quanprogress2" class="txtField" value="<?php echo $row['Quanprogress2']; ?>"><br>
a.ii.Qualitative Progress: <input type="text" name="Qualprogress2" class="txtField" value="<?php echo $row['Qualprogress2']; ?>"><br>
</div>
</div>
</div>
</form>
<?php

//}

?>
</body>
</html>
<?php include('ipdfooter.php');?>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.