Jump to content

Recommended Posts

Hello,

I am trying to echo form submission dates like so:

 

 date("l M dS, Y, H:i:s")

 

my question is how?

I have the following echoing rows from database table.

The submission_date is the column where, obviously, the submission dates are kept:

 

<?php
//Include database connection details

if (!mysql_connect($db_host, $db_user, $db_pwd))
    die("Can't connect to database");

if (!mysql_select_db($database))
    die("Can't select database");

$result = mysql_query("SELECT * FROM $table ORDER BY submission_id DESC");

if (!$result) {
    die("Query to show fields from table failed:".mysql_error());
}

while($row = mysql_fetch_array($result))
{
  echo "<table id=table1>";
  echo "<tr><td><b>";
  echo '<a href="resumeDisplay.php?id='.$row['submission_id'].'">'.$row['col_4'].'</a>';
  echo "</b><br />";
  echo $row['col_2'];
  echo "  |  ";
  echo $row['submission_date'];
  echo "</font></tr></td>";
  echo "</table>";
}
mysql_free_result($result);
?>

 

Link to comment
https://forums.phpfreaks.com/topic/127818-solved-formated-date/
Share on other sites

sorry, I'm not sure what you mean.

as i can tell the function time() stored the time/date of form submissions as an integer in the database column submission_date.

I just want that submission date to be echoed as an actual date,

because as it is i call the submission_date column to be displayed and it shows up as the 10 digit integer.

Link to comment
https://forums.phpfreaks.com/topic/127818-solved-formated-date/#findComment-661736
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.