So I recently made a website, and I have two questions I need answering.
The first is I have a form with multiple things in it (text fields, checkboxes and buttons). Now I want the form to check if the checkbox has been checked or not, and I have come up with this code:
<?php if(isset($_POST['Agree'])){
Redirect to page
}
else
{
echo 'You must agree to the terms.';
}
?>
As you can see, I'm stumped as what to do. Where would I put this? Right at the top where I start the form, or where the button is to submit the form?
The form begins with:
<form enctype='multipart/form-data' action='create-user.php' method='post'>
Help me please.
The second question is that users are created and put into an SQL database. Currently they appear as domain.com/123456 where 123456 is the username, and these have been crawled by google, which is BAD! I was thinking of somehow protecting these from being indexed, but I have no idea. Any help here? Thanks.