I have created a page where employees submits their daily status report at every end of the day so on admin page I have created 3 drop down menus first one is Select User Select Month Select Year

So a bit confused about the code to be intended I tried to create this code shown below Kindly suggest me what would be the concept I'll have to use??

<form name="form1" method="post" action="reportstat.php?show=1&uid=<?php echo $uid?>">
<label>
    <p>Select User</p>
    <p>
    <select name="select3">
        <?php 
            $recordset6 = mysql_query("select * from users");
            while($record6 = mysql_fetch_array($recordset6)) {
                echo"<option value=",$record6["uid"],">",$record6["ulogin"],"</option>";
            }
        ?>  
    </select>
    </P>
</label>

<label>
    <p>Select Month</p>
    <p>
    <select name="select1">
        <option value="1">January</option>
        <option value="2">February</option>
        <option value="3">March</option>
        <option value="4">April</option>
        <option value="5">May</option>
        <option value="6">June</option>
        <option value="7">July</option>
        <option value="8">August</option>
        <option value="9">September</option>
        <option value="10">October</option>
        <option value="11">November</option>
        <option value="12">December</option>
    </select>
    </p>
</label>

<label>
    <p>Select Year</p>
    <p>
    <select name="select2">
        <option value="2004">2004</option><option value="2005">2005</option>
        <option value="2006">2006</option><option value="2007">2007</option>
        <option value="2008">2008</option><option value="2009">2009</option>
        <option value="2010">2010</option><option value="2011">2011</option>
        <option value="2012">2012</option><option value="2013">2013</option>
        <option value="2014">2014</option><option value="2015">2015</option>
        <option value="2016">2016</option><option value="2017">2017</option>
        <option value="2018">2018</option><option value="2019">2019</option>
        <option value="2020">2020</option><option value="2021">2021</option>
        <option value="2022">2022</option><option value="2023">2023</option>
        <option value="2024">2024</option><option value="2025">2025</option>
        <option value="2026">2026</option><option value="2027">2027</option>
        <option value="2028">2028</option><option value="2029">2029</option>
        <option value="2030">2030</option><option value="2031">2031</option>
    </select>
    </p>
</label>

<label>
    <input type="submit" value="Show" name="button" class="button" style="float:left;margin-left:25%;">
</label>

and here is my php code

<?php 
    $month = $_POST["select1"];

    if($_GET["show"]==1) {
        $month = $_POST["select1"];
        $year = $_POST["select2"];
        $user = $_POST["select3"];
    }else {
        $month = date("m");
        $year = date("Y");
        $user = $uid;
    }

    if($_GET["can"]==1) { $user = $_GET["cuser"]; }

         $startday = 1;
                         if($month==1||$month==3||$month==5||$month==7||$month==8||$month==10||$month==12) {
        $endday = 31; 
    }
    if($month==4||$month==6||$month==9||$month==11) {
        $endday = 30;
    }
    if($month==2){
        if($year%4==0){
            $endday = 29;
    }else {
        $endday = 28;
    }
    }
                         echo "<script language = 'javascript'>
                        form1.select1.options[",$month-1,"].selected = true;
                        form1.select2.options[",$year-2004,"].selected = true;
                        </script>";
                        $result3    = mysql_query("SELECT * FROM dailyreport WHERE uid='" . intval($_POST['select3']) . "'");
        $row3       = mysql_fetch_array($result3);
        $uname      = $row3['uname'];
        $uid        = $row3['uid'];
        $totalleads = $row3['tleads'];
        $totalcomp  = $row3['tcomp'];
        $sales      = $row3['salespd'];

    $result4    = mysql_query("SELECT uname, (
                  select SUM(total_sales) \ SUM(total_dialed_leads) * 100
                  from dailyreport
    ) as 'sales performance', date FROM dailyreport WHERE sales_status = "approved"
    ");
                        echo $date;
                        echo $uname;
                        echo $uid;
                        echo $totalleads;
                        echo $totalcomp;
                        echo $sales;
        $total = $result4 * $month;

    echo"</table>";
    echo"<label><p style='width:55%;margin-left:20%;'>Total sales in this Month</p><p>",$total,"</p><label>";


        $recordset3 = mysql_query("select * from users where uid=".$user);
                while($record3 = mysql_fetch_array($recordset3)){
                echo"<script>
                for(k=0; k< form1.select3.length; k++) {
                if(form1.select3.options[k].text =='".$record3["ulogin"]."') {
            form1.select3.options[k].selected = true;
            }
        }
    </script>";
    }                                                       
?>

In my view the concept you used is OK. I am assuming the form and the PHP code are in the same script. So user can fill in the form to find data from previous months or just leave it blank and get data for the current month. There are few things that are important, but it seems you left them out:

Everytime you tend to use form data stored in the $_GET or $_POST array you have to check whether the element exists using the isset function else you will get an error:

if(isset($_GET["show"]) && $_GET["show"]==1) {
...

Sanitize all and every piece of user data you get from the form and you plan to insert it into the database or use in html on the page (use appropriate sanitization method, provide error handling):

 $month = intval($_POST["select1"]);
 $year = intval($_POST["select2"]);
 ...

Switch to some more modern database extension since mysql_* functions are obsolete. I recommend PDO, also mysqli_* is an option.

There is an error for a result4 query. Correct form might be (se quotes arround the approved word):

$result4 = mysql_query("SELECT uname, (
select SUM(total_sales) \ SUM(total_dialed_leads) * 100
from dailyreport
) as 'sales performance', date FROM dailyreport WHERE sales_status = 'approved'
");

Thank you for your kind response let me try and yes the form and the php are on the same page this is the admin page where adimg can see all user performance recond which user enters every day mean when leaving the office te enter thier daily report and submits but there is no way either they can view or we can view thier track record

Hello,

I tried your code and modiefied mine but somethingwent wrong gues what when I click on the user from the drop down and click on month year whene ever I select these 2 selections nothing happens no changes it shows only the last entered data do you want the post page as well where the users enter data daily and the admin should be able to see the record on per day bassisnot the very last record I beleive I am mising something or many thing I mean a big logics or code I am missing below is the updated Code

<?php 

    $month = $_POST["select1"];

    if(isset($_GET["show"]) && $_GET["show"]==1) {
        $month = intval($_POST["select1"]);
        $year  = intval($_POST["select2"]);
        $user  = intval($_POST["select3"]);
    }else {
        $month = date("m");
        $year = date("Y");
        $user = $uid;
     }

     if($_GET["can"]==1) { $user = $_GET["cuser"]; }

     $startday = 1;
     if($month==1||$month==3||$month==5||$month==7||$month==8||$month==10||$month==12) {
        $endday = 31; 
     }
     if($month==4||$month==6||$month==9||$month==11) {
        $endday = 30;
     }
     if($month==2){
        if($year%4==0){
            $endday = 29;
        }else {
            $endday = 28;
         }
     }
     echo "<script language = 'javascript'>
    form1.select1.options[",$month-1,"].selected = true;
    form1.select2.options[",$year-2004,"].selected = true;
    </script>";
    $result3    = mysql_query("SELECT * FROM dailyreport WHERE uid='" . intval($_POST['select3']) . "'");
    while($row3=mysql_fetch_array($result3)){
        $uname      = $row3['uname'];
        $uid        = $row3['uid'];
        $totalleads = $row3['tleads'];
        $totalcomp  = $row3['cleads'];
        $sales      = $row3['op_acc'];
        $date       = $row3['date'];
    }
        echo "Date : ".$date . "<br />";
        echo "User Name :" . $uname . "<br />";
        echo "User ID:" . $uid . "<br />";
        echo "Total Leads " . $totalleads . "<br />";
        echo "Total Leads Completed " . $totalcomp . "<br />";
        echo "Total Sales " . $sales;

    $result4 = mysql_query("SELECT uname, (
    select SUM(op_acc) from dailyreport ) as 'sales performance', date FROM dailyreport WHERE fdelivered = 'Yes'");
    $row4=mysql_fetch_array($result4);

    echo $opacc = $row4['op_acc'];
    $total = $result4 * $month;

        echo"</table>";
echo"<label><p style='width:55%;margin-left:20%;'>Total sales in this Month</p><p>",$total,"</p><label>";


    $recordset3 = mysql_query("select * from users where uid=".$user);
        while($record3 = mysql_fetch_array($recordset3)){
        echo"<script>
        for(k=0; k< form1.select3.length; k++) {
            if(form1.select3.options[k].text =='".$record3["ulogin"]."') {
            form1.select3.options[k].selected = true;
            }
        }
        </script>";
        }

?>

Here is the SQL data tables

-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 28, 2015 at 07:46 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `attendance`
--

-- --------------------------------------------------------

--
-- Table structure for table `dailyreport`
--

CREATE TABLE IF NOT EXISTS `dailyreport` (
  `uid` int(11) NOT NULL DEFAULT '0',
  `uname` varchar(255) NOT NULL DEFAULT '0',
  `rid` int(11) NOT NULL AUTO_INCREMENT,
  `fullname` varchar(11) NOT NULL,
  `date` date NOT NULL DEFAULT '0000-00-00',
  `campaign` varchar(255) NOT NULL,
  `tleads` int(255) NOT NULL,
  `cleads` int(255) NOT NULL,
  `sales` int(255) NOT NULL,
  `nsure` int(255) NOT NULL,
  `fdelivered` mediumtext NOT NULL,
  `reason` varchar(255) NOT NULL,
  `comments` mediumtext NOT NULL,
  PRIMARY KEY (`rid`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;

--
-- Dumping data for table `dailyreport`
--

INSERT INTO `dailyreport` (`uid`, `uname`, `rid`, `fullname`, `date`, `campaign`, `tleads`, `cleads`, `sales`, `nsure`, `fdelivered`, `reason`, `comments`) VALUES
(0, 'mursil.imam', 10, 'Mursil Imam', '2015-01-27', '', 0, 0, 0, 0, '', '', ''),
(53, 'mursil.imam', 11, 'Mursil Imam', '2015-01-28', '', 153, 73, 4, 18, 'Yes', '', 'Thank YoU');

and one thing more its not getting the whole entered value its getting only the last entered value

What is the structure of the users table? You use it to build the first dropdown (for selecting users). I have a slight feeling, that the dailyreport table should not contain the uname and fullname fields since these should be in the users table. Only the uid field should be in the dailyreport table, functioning as a key to connect it to the users table.

Can you post the whole script including the html (form) part.

here is the structure of the users table

-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 29, 2015 at 09:17 PM
-- Server version: 5.5.8
-- PHP Version: 5.3.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `attendance`
--

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `uid` int(11) NOT NULL AUTO_INCREMENT,
  `fname` varchar(25) NOT NULL DEFAULT '',
  `lname` varchar(25) NOT NULL DEFAULT '',
  `uaddress` varchar(80) NOT NULL DEFAULT '',
  `uphone` varchar(25) NOT NULL,
  `uemail` varchar(25) NOT NULL DEFAULT '',
  `fthname` varchar(25) NOT NULL DEFAULT '',
  `ulogin` varchar(25) NOT NULL DEFAULT '',
  `dob` varchar(20) NOT NULL DEFAULT '',
  `upassword` varchar(25) NOT NULL DEFAULT '',
  `jdate` varchar(20) NOT NULL DEFAULT '',
  `udesignation` varchar(45) NOT NULL DEFAULT '',
  `empstat` varchar(25) NOT NULL DEFAULT '',
  `utype` int(11) NOT NULL DEFAULT '0',
  `uwhours` varchar(50) NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 AUTO_INCREMENT=57 ;

For daily report form submission page i used this but somewhere there was issue so that is why i used just to get the values on form page so there would be no mistake for users to get it

<?php
$resultnew = mysql_query("SELECT * FROM users where uid='$uid'");
while($rownew = mysql_fetch_array($resultnew))
{  
    $fname = $rownew['fname'];
    $lname = $rownew['lname'];
    $uid   = $rownew['ulogin'];
    $userid= $rownew['uid'];

}
$fullname = $fname . " " . $lname;
$date1   = date('Y-m-d');
?>

Sure can you please let me know which page script you want??

form submission page or the status page??

Form submission page for now, please. So there are two pages now?

Here you go

<?php
    error_reporting(0);
    include_once("include/uchecksession.php");
    $uid = $_SESSION["uid"];        
    include_once("include/config.php");
?>
<html>
<head>
<title>Attendance System</title>
<meta http-equiv="Content-Type" content="text/html;">

<link type="text/css" rel="stylesheet" href="css/style.css" />
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<script src="javascript/script.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
        $("select").change(function(){
            $( "select option:selected").each(function(){
                if($(this).attr("value")=="bverify"){
                    $(".box").hide();
                    $(".bverify").show();
                }
                if($(this).attr("value")=="cmerch"){
                    $(".box").hide();
                    $(".cmerch").show();
                }
                if($(this).attr("value")=="pv"){
                    $(".box").hide();
                    $(".pv").show();
                }
                if($(this).attr("value")=="select"){
                    $(".box").hide();
                }
            });
        }).change();
    });

    $(document).ready(function(){
        $('input[type="radio"]').click(function(){
            if($(this).attr("value")=="No"){
                $(".btnbox").hide();
                $(".red").show();
            }
            if($(this).attr("value")=="Yes"){
                    $(".btnbox").hide();
            }
        });
    });
</script>
</head>

<body onload="startclock()">
<?php
$resultnew = mysql_query("SELECT * FROM users where uid='$uid'");
while($rownew = mysql_fetch_array($resultnew))
{  
    $fname = $rownew['fname'];
    $lname = $rownew['lname'];
    $uid   = $rownew['ulogin'];
    $userid= $rownew['uid'];

}
$fullname = $fname . " " . $lname;
$result4 = mysql_query("SELECT * FROM presence where uid='$userid'");
$row4 = mysql_fetch_array($result4);
$date = $row4['date'];
$date1   = date('Y-m-d');
?>
<div id="main">
    <div id="page-container">
    <div id="head">

        <div class="logout">
        <a href="logout.php"><img src="images/logout_btn.png" /></a>
        </div>

        <div class="logout">
        <a href="home.php"><img src="images/home_btn.png" /></a>
        </div>

    </div>
    <div class="container">
        <div id="main-left">
            <div class="clock-area">
            <div id="clock"></div>
            </div>

            <ul>
                <li><a href="profile.php">My Profile</a></li>
                <li><a href="pass.php">Password</a></li>
                <li><a href="ureports.php">Reports</a></li>
                <li><a href="timing.php">Shift Timings</a></li>
                <li><a href="rules.php">Rules & Regulations</a></li>
                <li><a href="daily_report.php">Daily Status Report</a></li>
            </ul>
        </div>

        <div id="main-right">
            <div style="width:100%;height:auto;"><h3>Welcome</h3><div class="line"></div></div>
            <div class="clear"></div>

            <div id="profile-info">
            <h4>Daily Status Report Submission</h4>

                <h2>Sorry for the inconvenience this page is under construction</h2>
                <div id="add">
                    <form method="post" name="form2" action="insert_report.php">

                    <label>  
                        <input name="uid" value="<?php echo $userid; ?>" readonly="" class="pw" type="hidden">
                        <p><b>User Name</b></p>
                        <p><input name="uname" value="<?php echo $uid; ?>" readonly="" class="pw" type="text"></p>
                        <p><b>Full Name</b></p>
                        <p><input name="fulname" value="<?php echo $fullname; ?>" readonly="" class="pw" type="text"></p>
                    </label>

                    <div class="clear"></div>

                    <label>  
                        <p><b>Date</b></p>
                        <p><input name="date" value="<?php echo $date1; ?>" readonly="" class="pw" type="text"></p>
                    </label>

                    <div class="clear"></div>

                    <label>  
                        <p><b>Campaign</b></p>
                        <p>
                            <select name="campaign">
                                <option value="select">Select Campaign</option>
                                <option value="bverify">Data Verification</option>
                                <option value="cmerch">Creative Merch</option>
                                <option value="pv">Data Cleaning</option>
                            </select>                            
                        </p>
                    </label>             

                    <div class="clear"></div>

                    <label>
                        <p><b>Total Leads</b></p>
                        <p><input name="tleads" class="pw" type="text"></p>                        
                    </label>

                    <div class="clear"></div>

                    <label>  
                        <p><b>Completed Leads</b></p>
                        <p><input name="cleads" class="pw" type="text"></p>
                    </label>

                    <div class="clear"></div>

                    <label style="display: none;" class="bverify box">   
                        <p><b>Open Accounts</b></p>
                        <p><input type="text" name="open" class="pw" ></p>
                        <p><b>Not Sure</b></p>
                        <p><input name="notsure" class="pw" type="text"></p>
                    </label>
                    <div class="clear"></div>
                    <label style="display: none;" class="cmerch box">    
                        <p><b>Logo Uploaded</b></p>
                        <p><input name="lupload" class="pw" type="text"></p>
                    </label>
                    <div class="clear"></div>
                    <label style="display: none;" class="pv box">    
                        <p><b>Verified Leads</b></p>
                        <p><input name="vleads" class="pw" type="text"></p>
                        <p><b>Unverified</b></p>
                        <p><input name="unverified" class="pw" type="text"></p>
                    </label>

                    <div class="clear"></div>

                    <label>  
                        <p style="width:22%;"><b>File Delivered</b></p>
                        <div class="block">
                        <input name="dreport" value="Yes" class="chk" type="radio">Yes
                        <input name="dreport" value="No" class="chk" type="radio">No
                        </div>

                        <div class="btnbox red">
                        <p><b>Reason</b></p>
                        <p><input name="reson" class="pw" type="text"></p>
                        </div>
                    </label>

                    <div class="clear"></div>

                    <div id="column">    
                        <p><b>Comments</b></p>
                        <p><textarea name="comments"></textarea></p>
                    </div>

                    <div class="clear"></div>

                    <label>
                        <p style="padding-left:138px;width:70%;"><input type="submit" name="button1" value="Submit" class="button" style="float:left;" />
                        <input type="reset" name="button1" value="Reset" class="button" style="float:left;" /></p>
                    </label>

            </div>
            </form>

        </div>
    </div>   
    </div>
    </div>
    <div class="clear"></div>
    <div id="footer">
    <p>Copyright &copy; 2009 | All Rights Reserved</p>
    </div>
</div>
</body>
</html>

Yes 2 pages are included at the very top there is the result page of status

and the one i sent you now is the form submission

This script is now different. I thought there are three dropdowns. Have you changed it or did you send me a wrong script?

The recently addeded field are them which i sent you now i was not getting these fields on the second page so for just checking and to run it i was just getting 2 to 4 field just for now for small scale when everything will be working i will be adding that I hope you understand

let me correct the codes and will sent you I beleive its confusing you

OK, but I'll have time to look at it tomorrow, hopefuly in the morning.

Thank you so much and i am alos trying hope so will acheive i am currently working on it

@broj1 Hello,

Did you got the solution

I thought you will post the last version of the code first.

okay I will submit you the code

<?php
    error_reporting(0);
    include_once("include/uchecksession.php");
    $uid = $_SESSION["uid"];        
    include_once("include/config.php");
?>
<html>
<head>
<title>Attendance System</title>
<meta http-equiv="Content-Type" content="text/html;">
<link type="text/css" rel="stylesheet" href="css/style.css" />
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<script src="javascript/script.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript">
   $(document).ready(function(){
        $("select").change(function(){
            $( "select option:selected").each(function(){
                if($(this).attr("value")=="bverify"){
                    $(".box").hide();
                    $(".bverify").show();
                }
                if($(this).attr("value")=="cmerch"){
                    $(".box").hide();
                    $(".cmerch").show();
                }
                if($(this).attr("value")=="pv"){
                    $(".box").hide();
                    $(".pv").show();
                }
                if($(this).attr("value")=="select"){
                    $(".box").hide();
                }
            });
        }).change();
    });
    $(document).ready(function(){
        $('input[type="radio"]').click(function(){
            if($(this).attr("value")=="No"){
                $(".btnbox").hide();
                $(".red").show();
            }
            if($(this).attr("value")=="Yes"){
                    $(".btnbox").hide();
            }
        });
    });
</script>
</head>
<body onload="startclock()">
<?php
$resultnew = mysql_query("SELECT * FROM users where uid='$uid'");
while($rownew = mysql_fetch_array($resultnew))
{  
    $fname = $rownew['fname'];
    $lname = $rownew['lname'];
    $uid   = $rownew['ulogin'];
    $userid= $rownew['uid'];
}
$fullname = $fname . " " . $lname;
$result4 = mysql_query("SELECT * FROM presence where uid='$userid'");
$row4 = mysql_fetch_array($result4);
$date = $row4['date'];
$date1   = date('Y-m-d');
?>
<div id="main">
    <div id="page-container">
    <div id="head">
        <div class="logout">
        <a href="logout.php"><img src="images/logout_btn.png" /></a>
        </div>
        <div class="logout">
        <a href="home.php"><img src="images/home_btn.png" /></a>
        </div>
    </div>
    <div class="container">
        <div id="main-left">
            <div class="clock-area">
            <div id="clock"></div>
            </div>
            <ul>
                <li><a href="profile.php">My Profile</a></li>
                <li><a href="pass.php">Password</a></li>
                <li><a href="ureports.php">Reports</a></li>
                <li><a href="timing.php">Shift Timings</a></li>
                <li><a href="rules.php">Rules & Regulations</a></li>
                <li><a href="daily_report.php">Daily Status Report</a></li>
            </ul>
        </div>
        <div id="main-right">
            <div style="width:100%;height:auto;"><h3>Welcome</h3><div class="line"></div></div>
            <div class="clear"></div>
            <div id="profile-info">
            <h4>Daily Status Report Submission</h4>
                <div id="add">
                    <form method="post" name="form2" action="insert_report.php">
                    <label>  
                        <input name="uid" value="<?php echo $userid; ?>" readonly="" class="pw" type="hidden">
                        <p><b>User Name</b></p>
                        <p><input name="uname" value="<?php echo $uid; ?>" readonly="" class="pw" type="text"></p>
                        <p><b>Full Name</b></p>
                        <p><input name="fulname" value="<?php echo $fullname; ?>" readonly="" class="pw" type="text"></p>
                    </label>
                    <div class="clear"></div>
                    <label>  
                        <p><b>Date</b></p>
                        <p><input name="date" value="<?php echo $date1; ?>" readonly="" class="pw" type="text"></p>
                    </label>
                    <div class="clear"></div>
                    <label>  
                        <p><b>Campaign</b></p>
                        <p>
                            <select name="campaign">
                                <option value="select">Select Campaign</option>
                                <option value="bverify">Data Verification</option>
                                <option value="cmerch">Creative Merch</option>
                                <option value="pv">Data Cleaning</option>
                            </select>                            
                        </p>
                    </label>             
                    <div class="clear"></div>
                    <label>
                        <p><b>Total Leads</b></p>
                        <p><input name="tleads" class="pw" type="text"></p>                        
                    </label>
                    <div class="clear"></div>
                    <label>  
                        <p><b>Completed Leads</b></p>
                        <p><input name="cleads" class="pw" type="text"></p>
                    </label>
                    <div class="clear"></div>
                    <label style="display: none;" class="bverify box">   
                        <p><b>Open Accounts</b></p>
                        <p><input type="text" name="open" class="pw" ></p>
                        <p><b>Not Sure</b></p>
                        <p><input name="notsure" class="pw" type="text"></p>
                    </label>
                    <div class="clear"></div>
                    <label>  
                        <p style="width:22%;"><b>File Delivered</b></p>
                        <div class="block">
                        <input name="dreport" value="Yes" class="chk" type="radio">Yes
                        <input name="dreport" value="No" class="chk" type="radio">No
                        </div>
                        <div class="btnbox red">
                        <p><b>Reason</b></p>
                        <p><input name="reson" class="pw" type="text"></p>
                        </div>
                    </label>
                    <div class="clear"></div>
                    <div id="column">    
                        <p><b>Comments</b></p>
                        <p><textarea name="comments"></textarea></p>
                    </div>
                    <div class="clear"></div>
                    <label>
                        <p style="padding-left:138px;width:70%;"><input type="submit" name="button1" value="Submit" class="button" style="float:left;" />
                        <input type="reset" name="button1" value="Reset" class="button" style="float:left;" /></p>
                    </label>
            </div>
            </form>
        </div>
    </div>   
    </div>
    </div>
    <div class="clear"></div>
    <div id="footer">
    <p>Copyright &copy; 2009 | All Rights Reserved</p>
    </div>
</div>
</body>
</html>

Php code for the reterival page which first I was just geting some of the fileds here I am getting all fields

<?php 
$result3    = mysql_query("SELECT * FROM dailyreport WHERE uid='" . intval($_POST['select3']) . "'");
    while($row3=mysql_fetch_array($result3)){
        $uname      = $row3['uname'];
        $uid        = $row3['uid'];
        $full_name  = $row3['fullname'];
        $totalleads = $row3['tleads'];
        $totalcomp  = $row3['cleads'];
        $sales      = $row3['op_acc'];
        $nsure      = $row3['nsure'];
        $date       = $row3['date'];
        $status     = $row3['fdelivered'];
    }
        echo "Date : ".$date . "<br />";
        echo "User Name :" . $uname . "<br />";
        echo "User ID:" . $uid . "<br />";
        echo "Total Leads " . $totalleads . "<br />";
        echo "Total Leads Completed " . $totalcomp . "<br;
        echo "Total Sales " . $sales . "<br";
        echo "Not Sure " . $nsure . "<br";
        echo "Status " . $statuss . "<br";
?>

I hope this was you were looking for

I am waiting for the help :)

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.