something like this:
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
setcookie("formSubmitted", "yes", time()+(60*60*24*30), "/", "", 0);
}
?>
If thats correct how do you structure an if statment to wrap the modal code in?
is this the way?
<?php
if ("".$_COOKIE['formSubmitted'] ."" != "Yes") {
?>
<?php } ?>
EDIT. Have tried the above and it works, however if validation fails the modal disappears (as the submit button has been pressed) and I would assume that the 'thanks' message would not display either.... how would I get round this?