romy1103 Posted April 9, 2015 Share Posted April 9, 2015 Hello There, I am trying to add custom form in one of my cams page after adding the below form code in cms page and the mail script below in cmscontroller.php but getting error continuously. form code in cms page: <form action="" method="post"> <div><label>NAME</label> <div><input id="name" style="width: 220px; height: 28px;" name="name" type="text" /></div> </div> <br /> <div><label>Email</label> <div><input id="email" style="width: 220px; height: 28px;" name="email" type="text" /></div> </div> <br /> <div><label>Phone No (Optional)</label> <div><input id="phone_number" style="width: 220px; height: 28px;" name="subject" type="text" /></div> </div> <br /> <div><label>Message</label> <div><textarea id="message" style="width: 340px; height: 100px;" cols="25" name="message" rows="6"></textarea></div> </div> <br /> <div><input class="button" name="customcontact" type="submit" value="Submit" /></div> </form> Mail Script in cmscontroller.php if (isset($_POST[‘customcontact'])) { $name = $_POST['name']; $email = $_POST['email']; $phonenumber = $_POST[‘phone_number’]; $message = $_POST['message']; $formcontent="From: $name \n Email: $email \n Message: $message"; $recipient = “[email protected]”; $subject = "Quick Contact Form"; $mailheader = "From: $email \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("Error"); header(“Location: http://ccintserver.com / prestashop”) ; } I cannot figure out where the problem is.Any help will be highly appreciated Thanks! Link to comment Share on other sites More sharing options...
romy1103 Posted April 9, 2015 Author Share Posted April 9, 2015 Can anyone help me out on this please? Link to comment Share on other sites More sharing options...
Abrasax Posted April 14, 2015 Share Posted April 14, 2015 Im trying to do the same... you've found a way to do it? Link to comment Share on other sites More sharing options...
safaso Posted July 3, 2015 Share Posted July 3, 2015 I also have same problem ,do you found the solution ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now