Jump to content

Search the Community

Showing results for tags 'php mysql html date'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. What I want to do is update the date/time field when the check box or a button is selected for that specific row only. on clicking the button it should get the current date and time and store it into the database in the date/time field. Is this possible to do? here is a snapshot of my code so far. <?php $query1 = "SELECT * FROM software"; $result1 = mysql_query($query1); $id = $row['SoftwareID']; $time = time(); $timestamp = $_POST[date('Y-m-d H:i:s', $time)]; $query2 = "UPDATE software SET timestamp = '$timestamp' WHERE SoftwareID = '$id'" ; ?> <br> <table border ="1" width="justified" <tr> <th><center>Version Number </th></center> <th><center>Defect Number</th> <th><center>Description</th> <th><center>Date/Time</th> <th><center>Ready?</th> </tr> <?php while ($row = mysql_fetch_array($result1)) { $versionnumber = $row['VersionNumber']; $defectnumber = $row['DefectNumber']; $description = $row['Description']; $timestamp = $row['timestamp']; ?> <tr> <td><?php echo $versionnumber; ?></td> <td> <?= $defectnumber ?></td> <td> <?= $description ?></td> <form action="" method="post"> <td> <?= $timestamp ?></td> <td> <input type="submit" value="Submit Time"></td></form> </tr> <?php } ?> </table> </br> insert.php <?php include("databaseConnection.php"); $versionnumber = $_POST [versionnumber]; $defectnumber = $_POST [defectnumber]; $description = $_POST [description]; $qry = "INSERT INTO software (versionnumber, defectnumber, description) VALUES ('$versionnumber','$defectnumber','$description')"; $result = mysql_query($qry); if ($result) { echo "information submitted, "; header("location: developer_dashboard.php"); exit(); } else { die("There was an error, try again later"); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.