Hi guys,
I have a form that posts to the page it's on using $PHP_SELF as the form action, but the ISSET($_POST['submit']) command does not appear to be working
As soon as you go to the page, it is making an entry in the database using the below query, even before the submit button is clicked. It seems to be ignoring the if statement and just making the entry in the DB regardless of whether the submit button has been clicked or not.
if (isset($_POST['submit']));
{
$query2 ="INSERT INTO comments (photo_name, user_id, user_photo, date_comment, comment) VALUES ('$photo', '$sessemail', '$sessphoto', '$time', '$comment')";
$result2 = mysql_query($query2) or die (mysql_error());
}
I've been trying to figure this out all evening, any idea if there's anything obviously wrong?
Cheeers,