1.

Solve : php time and php date?

Answer»

I need to update a date used field (lastused) and time used field (time). how to relate with code?
Hey there,

This is a pretty cool website. Not had much time to look at the coding though, but hope this LINK helps,

https://www.w3schools.com/php/php_date.asphi guys, thought I'd try this. Trying to display records in database. Below is my code: Help?
-------------------------------------------------------


<center>lookup Link List</center>


<?php
error_reporting(E_ALL ^ E_NOTICE);
// error_reporting(0);
<?php
include('lookupdb-connect.php');
$query = "SELECT * FROM `lookuptbl` WHERE `TARGET` = `$target` ORDER by target Asc";
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC))
{
echo '<table style="border:1px solid RED;">',
'<TR align="center" >
<td>', $row['target'], '</td>
<td>', $row['purpose'], '</td>
<td>', $row['user'], '</td>
<td>', $row['password'], '</td>
<td>', $row['email'], '</td>
<td>', $row['sec?'], '</td>
<td>', $row['secAns'], '</td>
<td>', $row['visits'], '</td>
<td>', $row['lastdate'], '</td>
<td>', $row['lasttime'], '</td>
<td>', $row['saved?'], '</td>
</tr>
</table>';
?>
</body></html>
-----------------------------------------------
this is displayed:

lookup Link List

query($query) or die($mysqli->error.__LINE__); while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) { echo '', '
', $row['target'], ' ', $row['purpose'], ' ', $row['user'], ' ', $row['password'], ' ', $row['email'], ' ', $row['sec?'], ' ', $row['secAns'], ' ', $row['visits'], ' ', $row['lastdate'], ' ', $row['lasttime'], ' ', $row['saved?'], '
'; ?>

Hey there,

Hope you got this one working. Sorry nobody has got back to you. If you're not still having issues with this can you close the thread please.

your code should have " " and where you have , should be a stop like . and also should have echo at the start.

so

Code: [Select]<td>', $row['target'], '</td>
Should be

Code: [Select]echo "<td>".$row['target']."</td>";
I'm sure by now you have had the answer, so hope all is well with you, and if you could close the thread please that WOULD be great, thanks!



Discussion

No Comment Found