PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello everyone.
I am having problems with my date showing up. In mysql database I have a row set as $time and it is date NOT NULL.
Here is my form:
[syntax="html"]<br><b><a NAME="ADD">Add a message to the board:</b><br>
<form action="insert3.php" method="post">
Name:<br> <input type="text" name="first"><br>
Message:<br> <textarea name="message" rows="15" cols="45"></textarea><br><br>
<input type="Submit" value="Submit">
</form></a>
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
One last question, with my code how would I code a button so I can just click it to delete a post and it deletes from the mysql table?
Here Is the code that shows the information:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
<?php
if (!empty($_POST))
{
if (isset($_POST['delete_this']))
{
if (isset($_POST['hidden_value']))
{
echo 'I tried to hide ' . $_POST['hidden_value'];
}
else
{
echo 'This did not work as it was supposed to.';
}
}
}
?>
<form id="my-form" action="<?php echo basename(__FILE__); ?>" method="post">
<input type="hidden" name="hidden_value" value="creamymonkeysnot" />
<input type="submit" name="delete_this" value="What happens when you click me?" />
</form>