Hey All,
I have a script that accepts posts from other websites. I need to require certain fields to be filled in. or have it error out.
I had used this example in an old script I did and it worked then.
// Check for empty fields
if(!$_POST['m2020_id'] || !$_POST['m_firstname'] || !$_POST['m_lastname'] || !$_POST['m_email'] ||
!$_POST['m_phone'] || !$_POST['m_address'] || !$_POST['m_city'] || !$_POST['m_zippost'] || !$_POST['m_state'] ||
!$_POST['m_descrip'] || !$_POST['m_currency'])
{
echo 'Transaction Error!!!<br><br>If this continues Please contact your Rep';
exit;
}
It is not working with the $_POST['vars'] ?? Does anyone have an example of the best way to make sure the certain fields are set. I know javascript on the form would be best but my site is accepting the form data from other sites. If they dont submit the required it Errors out and quits.
thx for any help
Eric