Thanks I see that and corrected it but it still does not filter properly.
It still comes through if it is 200000 or 400000.
I also tried to use use >400000
Try to be as as detailed as possible when mentioning “errors”. Without supplying the error message and new source code used, in any case when trying to get help, stops us from moving forward in our attempts to help out.
from a php formmail script trying to filter with numbers
// recipient info
$charset[0]="UTF-8";
$tomail[0]="example@yahoo.com";
var_dump($_POST);
if($_POST['State']=="Texas" OR $_POST['State']=="Illinois" AND $_POST['Amt'] >"417000"){
$cc_tomail[0]="";
$bcc_tomail[0]="test@yahoo.com";
}
I get this warning:
Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/site.com/submit/mail.php:21) in /home/public_html/site.com/submit/mail.php on line 575
that particular line in the mail.php is: header("Location: ".$thanks_page[$config]);
Okay. What that error means is that you have already outputted data to the screen, so it cant send a header (one was already created). You dont want to forward from that page at the moment anyway because you want to be able to read the var_dump that is produced. so lets run this code:
// recipient info
$charset[0]="UTF-8";
$tomail[0]="example@yahoo.com";
var_dump($_POST);exit; //added exit
if($_POST['State']=="Texas" OR $_POST['State']=="Illinois" AND $_POST['Amt'] >"417000"){
$cc_tomail[0]="";
$bcc_tomail[0]="test@yahoo.com";
}
the program will exit before anythign else, allowing you to see the var dump
it is a form-mail script with many fields and it is spitting all those out when click submit.
Not really what I was looking for. I just wanted a filter based on numbers input in a field.
I don’t understand what relationship it has filtering
Okay, we need to see that information to be able to help you. Unless I see what is being stored in [‘Amount’], I can’t fix your code. I want you to copy and paste what it writes to the screen in a response here so I can see how to fix your code.