Form EMPTY select option to PHP -


Look around and find answers to my problem

I have PHP,

My Selection Code

  & lt; Form id = "contact-form", but I can not select the option (it remains empty), no choice. & Gt; & Lt; Select ID = "topic" name = "topic" class = "form-control" required = "required" & gt; & Lt; Option value = "" selected = "" & gt; Escriber: & lt; / Options & gt; & Lt; Option value = "Service" & gt; General customer service & lt; / Options & gt; & Lt; Option value = "Suggestion" & gt; Suggestions & lt; / Options & gt; & Lt; Option value = "product" & gt; Product Support & lt; / Options & gt; & Lt; / Select & gt; & Lt; / Form & gt;  

My PHP code

  & lt ;? Check for Php // blank field (below ($ _ POST ["name"]) | below ($ _POST ["email"]) below ($ _ POST ["subject"]) below ($ _ POST [ "Message"]). Filter_ver ($ _ POST ["email"], FILTER_VALIDATE_EMAIL) {echo "error"; description is false;}  

it always triggers error because $ _POST ["Subject"] is empty

Help!)

A method on the form element requires that it be asked to use POST instead of GET.

Change this:

  & lt; Form ID = "Contact Form" & gt;  

To do this:

  & lt; Form id = "contact-form" method = "post" & gt;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -