php - My contact form doesn't work -


I have created a contact form after a tutorial. It was uploaded as well on the Vamp as a test. But I'm still getting an error, but I'm actually unable to find the error. Maybe because I'm unaware of PHP, someone can check my code and tell me the problem. I believe the problem is very small thanks.

  & lt ;! DOCTYPE HTML & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" & gt; & Lt; Link rel = "stylesheet" href = "index.css" & gt; & Lt; Title & gt; Contact form & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Header class = "body" & gt; & Lt; / Header & gt; & Lt; Section class = "body" & gt; & Lt ;? Php $ name = $ _POST ['name']; $ Email = $ _POST ['email']; $ Message = $ _POST ['message']; $ From = 'to: tangledmo'; $ From = 'aijaz@techanipr.com'; $ Theme = 'hello'; $ Body = "From: $ name \ nEmail: $ email \ nMsg: \ n $ message"; ? & Gt; & Lt ;? php if ($ _POST ['submit']) {if (mail ($ $, $ theme, $ body, $ from)) {echo '& lt; P & gt; Your message has been sent! & Lt; / P & gt; '; } Else {echo & lt; P & gt; Something went wrong, go back and try again! & Lt; / P & gt; '; }}? & Gt; & Lt; Form method = "post" action = "index.php" & gt; & Lt; Label & gt; Name & lt; / Labels & gt; & Lt; Input name = "name" placeholder = "write here" & gt; & Lt; Label & gt; Email & lt; / Labels & gt; & Lt; Input name = "email" type = "email" placeholder = "write here" & gt; & Lt; Label & gt; Message & lt; / Labels & gt; & Lt; textarea name = "message" placeholder = "write here" & gt; & Lt; / Textarea & gt; & Lt; Input id = "submit" placeholder = "type here" name = "submit" type = "submit" value = "submit" & gt; & Lt; / Form & gt; & Lt; / Section & gt; & Lt; Footer class = "body" & gt; & Lt; / Footer & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

if your if ($ _ POST ['submit']) short case "s", it should be a capital "s".

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -