Note that there are some explanatory texts on larger screens.

plurals
  1. POIs the way a bot submits a form different than someone using a browser?
    primarykey
    data
    text
    <p>I have a HTML form that uses php to send the info captured to me in an email.</p> <p>Recently I have been recieving a number of these emails that do not have useful information. I assumed that this was just bots submitting random forms since I don't bother with a capture or anything else and dismissed it. </p> <p>Today when one of these emails came in I noticed that there is no way that I could reproduce the contents of the emails I have been receiving if I submitted my form from a browser because there are several fields that would contain something - even if it's just the default value which my drop down menus have. </p> <p>Do you think that the way the bots (if that is what is doing this) are submitting the form removing the default values? Or would it be more likely that these could be legitimate users and my php code has a bug and is somehow breaking my email form?</p> <p>My php code basically loops through and checks if fields are empty and if they are not it adds it to the email body. </p> <p>edit:</p> <p>Here's the php code I use:</p> <pre><code> $valid = new Validation($_POST); if($CONTINUE = $valid-&gt;success) { $to = "myemail"; $subject = "Subject"; $from_email = $to; $from_name = $name; $headers = "From: $from_name&lt;$from_email&gt;\n"; $headers .= "Reply-To: &lt;$email&gt;\n"; $headers .= "Return-Path: &lt;$from_email&gt;\n"; $body = "The following information we recently submitted\n"; $qstring=""; unset($_POST['required_fields']); reset($_POST); while(list($key, $value) = each($_POST)) { if(!empty($value)) { $body .= proper_form($key) . ": " . stripslashes($value) ."\n"; $qstring .= "&amp;".$key."=".$value; } } mail($to,$subject,$body,$headers); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload