I have the following code:
<?php
...
?>
<script>
....
</script>
<html>
...
</html>
After displaying HTML form, JavaScript should validate and then PHP should save in database and give a confirmation message.. but what happens is, after PHP is executed and success message is echoed, the HTML form also displays as it is below message.. What can I do to avoid this?