So I'm building a rather simple contact form and everything is working correctly except my dropdowns.
HTML:
I've only included this select because as I said, everything else on the form (simple inputs) are being passed and error checked successfully.HTML Code:<select name="requestType"> <option value="default" selected="yes">Select a Request Type</option> <option value="salesRep">Speak to a Sales Rep</option> <option value="generalInfo">General Information</option> </select>
My question is how do I check to see if the default value has been selected, in my case it's "Select a Request Type" or a valid option like salesRep?
The form is posting to sendContact.php and from there I have:
If I include $requestType in the email that I send I get "Select a Request Type" rather than "default" so I even tried if($requestType == "Select a Request Type") but it still didn't work.PHP Code:$requestType = $_REQUEST['requestType'];
if($requestType == "default") {
header('Location: contact.php?sent=no');
}
Anybody have any ideas? Thanks for any and all help!
Jeff



Reply With Quote
Bookmarks