Form Check

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
User avatar
New php-forum User
New php-forum User
Posts: 21
Joined: Mon Feb 13, 2006 1:54 am
Location: South Africa

Sun Mar 12, 2006 11:37 pm

You are checking the input for missing fields and if you find it you are echoing an error message and then allowing the script to continue running. What you need to do is to stop it from running, by adding "exit;" to the code, like this :-

Code: Select all

if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) 
  echo "<h2>Use Back - Enter valid e-mail</h2>\n"; 
  echo "<h2>Feedback was NOT submitted</h2>\n";
Note also that $badinput was changed to echo
Power is the only pure motivator of humanity

Post Reply