I have a form on a page at the bottom I have a checkbox to agree to some rules before the info is submitted to the db. At the top in the <? I Check if submitted and then check the status of the checkbox. If the checkbox has been checked then it proceeds if not a javascript alert appears telling the user that they must agree to continue and the page refreshes for some reason, when this happens all the fields the user had entered are erased. What can I do to avoid this? I need to keep the info in the fields and alert or how can I put the error message on the page dynamically with php? I will have to verify the info in the fields and I have seen people use red text when a field is blank or improperly filled, how can I accomplish this?