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

  • SEARCH
  • Home
  • 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 8612665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:41:02+00:00 2026-06-12T04:41:02+00:00

I have created a support form for some clients, they submit information to it

  • 0

I have created a support form for some clients, they submit information to it and I see it in a panel I have created. In this panel I want to have the ability to check a box next to a record and hit an update button and it will update that record with a time stamp showing I have completed the work and what time. Here is the sample code

 echo "<table border='1'>
<tr>
<th>ICL</th>
<th>PAGE ID</th>
<th>SUBMISSION NAME</th>
<th>UPTDATES/BUGS</th>
<th>MISSING INFO</th>
<th>TIME OF SUBMISSION</th>
<th>COMPLETED</th>
<th>TIME COMPLETED</th>
</tr>";
echo "<form name='completed' action='insert4panel.php' method='post'>";
while($row = mysql_fetch_array($results))
  {
  echo "<tr>";
  echo "<td>" . $row['ICL'] . "</td>";
  echo "<td>" . $row['officename'] . "</td>";
  echo "<td>" . $row['submitname'] . "</td>";
  echo "<td>" . $row['feedback'] . "</td>";
  echo "<td>" . $row['missinginfo'] . "</td>";
  echo "<td>" . $row['TimeStamp'] . "</td>";
  echo "<td><input type='checkbox' name='complete'></td>";
  echo "<td>" . $row['completionstamp'] . "</td>";
  echo "</tr>";
  }
echo "<input type='submit' value='Update'>";
echo "</form>";
echo "</table>";

What happens when I hit submit I send it to this code

$timeissued=$_POST["complete"];
$date = date("m-d-y H:i:s");
mysql_query("INSERT INTO SITES (completed, completetime )
VALUES ('$timeissued' ,'$date')");

I know that I’m not telling it which record I want to add the timestamp or the check box to, so it isn’t going to do it, however it creates a new record with a timestamp doesn’t save the check box and leaves the rest of the fields blank. I’m sure the answer is simple

  • 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-12T04:41:03+00:00Added an answer on June 12, 2026 at 4:41 am

    Modify your checkbox so that it is a value=1 attribute.

    Change the name of said checkbox to name=complete[$id]

    Now, on the PHP side of things, do something along the lines of…

    <?php
    $complete = $_POST["complete"];
    $time = time();
    foreach($complete as $key => $value) {
        $query = "UPDATE SITES
                  SET completed=1, completedtime='$time'
                  WHERE id = '$key'";
        // This query is not in any way secure...
        mysql_query($query);
    }
    

    This will loop through ALL of the checkboxes you hit and set the completed field in your database to 1, and the completedtime field to the current time stamp, which is an integer.

    Though, you shouldn’t be using mysql_* functions on account of them being deprecated. You should look into PDO.

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

Sidebar

Related Questions

I have created the DateTimePicker control. Now i want to add localization Support with
I have created a signup form for secure zone in Business Catalyst. I want
Okay, so i have created a new support ticket system, but in my ticket
I have created following thing in android using android compatibility support package Basically i
I have set up the Apache tomcat 5 to support ssl. Created self signed
I have created some JQuery that will expand a div 'popup' on hover and
Hi I have created the code below to check if a user is valid
I have a backend where people may take some time filling out the form.
I have a form with a number of text boxes. I want to create
I have created a search form and search.php file to display the result. The

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.