Sunday, 15 June 2014

html - PHP email not getting sent with if statement -


I am trying to use php to mail an email to a user if they check the checkbox sent email Does not go. Are you ($ _ POST ["receive-access"]) === Checked ?

HTML:

  & lt; Tr & gt; You can use. & Lt; Td> & Lt; P style = "font-family: latin;" & Gt; Email: & lt; / Td> & Lt; Td> & Lt; Input type = "email" name = "mail" id = "mail" style = "font-family: latine," required & gt; & Lt; / P & gt; & Lt; / TD & gt; & Lt; Br> & Lt; / TR & gt; & Lt; Tr & gt; & Lt; Td> & Lt; Input type = "checkbox" id = "get-access" name = "get-access" & gt; & Lt; / Td> & Lt; Td> & Lt; Label = "get-access" & gt; Check this box to access restricted areas. & Lt; / Labels & gt; & Lt; / Td> & Lt; / Tr & gt;  

PHP:

  & lt ;? Php $ message = "Username: Username password: password"; $ Recipient = $ _POST ["mail"]; If (isset ($ _ POST ["get-access"]) === Checked mail ($ recipient, "restricted access username and password", $ message);? & Gt;  

Here is why you do this so the checkbox will not be present in the post if it is unchecked. If the $ {_POST ['' ('$' - '' '$' "'' 'Receipts']' & amp; $ _POST ['Receipts'] =' ' Received- login '] = true;} and {$ _POST [' get-access'] = wrong;} $ Message = "user Gm: Username password: password "; $ recipient = $ _POST [" mail "]; if (isset ($ _ POST [" receive-access "] == true) Mail ($ recipient," restricted access username and password " , $ Message);


No comments:

Post a Comment