Hi, I seem to have a problem getting the date to display in my database. Everything else works just fine, it even shows the date on the form when I changed the input type from hidden to text. All I get in my row in the database is the word “date”.
I’m thinking it must be something simple I’m missing, either that or I’m coming at the problem the complete wrong way as I’m fairly new to PHP.
[php]
<?php
if ($_SESSION['username'])
{
echo "Welcome, " . $_SESSION['username'] . "<br><a href='logout.php'>Logout</a></br>";
}
else
{
die("You must be logged in");
}
?>
<p></p>
<form method="post" action="member.php">
<input type="hidden" name="add" value="true" />
<div>
<label for="title">Title:</label>
<input type="text" name="title" />
<>
<input type="hidden" name="date" value="<? echo date("M d, Y"); ?>" />
<div>
<label for="body">Body:</label>
<textarea name="body" id="body" rows="8" cols="40" </textarea>
<>
<label for="name">Name:</label>
<input type="text" name="name" />
<>
<div>
<input type="submit" name="submit" value="Add Content" />
</form>
<>
<img src="../images/bottom_box.png" width="840" height="40" />
<>
<>
<>
[/php]