Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8851499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:10:12+00:00 2026-06-14T13:10:12+00:00

i have a table named as item_request and it has twofields named as projectmanager

  • 0

i have a table named as item_request and it has twofields named as projectmanager and createddate which has the Timestamp format as 2012-09-11 17:46:25.

Now i want to call these two fields in another form which count the user entry between 2 different dates.and the date field is fetched from the timestamp.with this form i m sending the value through datetime picker having the format 10-12-2012 but the value in databse is in different format and the value i m sending is in diffferent format.how is it possible plzzz help me guys.

Here is the code for my form:

<?php 
include("config.php");
ob_start();
error_reporting(0);
if(!isset($_SESSION[username]))
header("location: index.php");
if(isset($_POST[submit]))
{
$projectmanager=mysql_real_escape_string($_POST['projectmanager']);
$date=mysql_real_escape_string($_POST['date']);
$dateexp = explode("-",$date);
$date = mysql_real_escape_string($dateexp[0]."/".$dateexp[1]."/".$dateexp[2]);


$date1=mysql_real_escape_string($_POST['date1']);
$dateexp1 = explode("-",$date1);
$date1 = mysql_real_escape_string($dateexp1[0]."/".$dateexp1[1]."/".$dateexp1[2]);

echo $queryuser= "select * from  item_request where projectmanager=$projectmanager AND (requireddate>=$date AND requireddate<=$date1)";

}
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Project Managers Registrarion</title>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<script language="javascript" type="text/javascript" src="js/datetimepicker.js">

//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
//For this script, visit http://www.javascriptkit.com

</script>

</head>
<body>

<div class="container">
  <div class="header"><a href="#"><img src="images/cherry-new.jpg" width="79" height="93" /></a> 
    <!-- end .header --></div>
<?php include("rightMenu.php");?>
  <div class="content">
    <h1>PR Count</h1>
    <div style="padding:10px 0px; text-align:center; color:#990000;">
    </div>
    <form action="" method="post" name="loginform">


<table width="100%" border="0" cellspacing="2" cellpadding="2">
  <tr>
  <td>Project Managers</td>
           <td><select name="projectmanager" style="width:145px;" id="projectmanager" onChange="showUser(this.options[this.selectedIndex].id)">
               <option value="">Select</option>
               <?php $queryuser= "select * from  projectmanagers";
              $fetuser1user = mysql_query($queryuser);
              while($fetuser = mysql_fetch_array($fetuser1user)){
        ?>
               <option id="<?php echo $fetuser['id']?>" value="<?php echo $fetuser['id']?>"><?php echo $fetuser['projectmanager']?></option>
               <?php }
        ?>
             </select></td>
     </tr>
  <tr>
    <td>Date From</td>
    <td>
      <input id="date" type="text" size="20" name="date"  /><a href="javascript:NewCal('date','ddmmyyyy')"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a></td>
  </tr>
  <tr>
    <td>Date To</td>
    <td>
      <input id="date1" type="text" size="20" name="date1"><a href="javascript:NewCal('date1','ddmmyyyy')"><img src="images/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>
      <input type="submit" name="submit" id="submit" value="Submit" onClick="return formvalidate();"/>
 </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>


       <table width="100%" border="1"><tr>
                <td width="18%" valign="middle" class="tableheading">PI.No.</td>
                <td width="18%" valign="middle" class="tableheading">Project Manager</td>
                <td width="18%" valign="middle" class="tableheading">Date Created</td>
                <td width="15%" valign="middle" class="tableheading">Action</td>
                </tr>
                 <?php 
                 // to print the records
                $select = "select * from item_request";
                $query1 = mysql_query($select);  
                 while($value = mysql_fetch_array($query1)){ ?>

                <tr>
                <td class="tabletext"><?php echo $value[id];?></td>
                <td class="tabletext"><?php echo $value[projectmanager];?></td>
                <td class="tabletext"><?php echo $value[datefrom];?></td>               
                <td class="tabletext"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?id=<?php echo $value[id];?>&cmd=edit"><img src="images/edit.png" width="25" height="25" border="0" title="Edit" /></a>
               <a href="<?php echo $_SERVER['PHP_SELF']; ?>?id=<?php  echo $value[id];?>&cmd=delete" onclick="return confirm('Are you sure you want to delete <?php  echo $value[projectmanager];?>?')"><img src="images/deleteBtn.png" width="25" height="25" border="0" title="Edit" /></a></td>
              </tr><?php }?>
                </table>
    </form>


    <!-- end .content --></div>
  <?php include("footer.php");?>
  <!-- end .container --></div>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:10:14+00:00Added an answer on June 14, 2026 at 1:10 pm

    Replace this function call…

    javascript:NewCal('date','ddmmyyyy');
    

    with this one…

    javascript:NewCal('date','ddmmyyyy',true,24);
    

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table named tbl_Subjects_Taken which lists all the subjects taken by the
I have a table named with Sales having the following columns: Sales_ID|Product_Code|Zone|District|State|Distributor|Total_Sales Now i
I have a table which has a button to Add Rows. This button adds
I have an HTML table where each row has buttons which toggle status bits
I have a constraint (named INVS_ITEM_LOCATIONS_PK ) in my SQL Server 2005 table. How
Lets say I have table named Place with columns: placeId int not null auto_increment,
I have a table named datas and I'm executing a query like this: SELECT
I have a table named size here, something like this: size id | size
I have a table named scores with the columns id and score . I
I have a table named stats player_id team_id match_date goal assist` 1 8 2010-01-01

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.