morning all - amended question, as data now enters db correctly,
I'm a newbie to php/mysql, but through various articles and guides have built a form, which when submitted I want the user to be sent to a separate THANK YOU PAGE (so I can track conversions etc).
Here's the code I'm currently using, which when the form is submitted with no errors, delivers a 'THANK YOU' message on the same page:
<?php
if(isset($error))
{echo "<span id='Warning'>Please enter all areas marked with *</span>";}
else if (isset($sent))
{echo "<span id='Normal'>Thank you for your enquiry, we will contact you shortly</span>";}
?>
Previously I was using the following after the mysql query (where the fields enter the db), but this sent users to the 'THANK YOU' page even if there were errors with the form they completed
header('Location: http://www.THANK-YOU-PAGE');
}
?>
Can anyone see anything glaringly wrong? I'm new to this, so any help is appreciated.
Thanks