August 31, 201115 yr hi guys, Have a contact for i use quite often. It work just fine before i styled it, so i was wondering if anybody could see anything wrong. Thanks. Mail.php reads <?php $subject = "Real Motoring Tuition | Website Contact Form Submission"; $name = $_POST['f_name']; $postcode = $_POST['f_postcode']; $email = $_POST['f_email']; $number = $_POST['f_number']; $message = $_POST['f_message']; $message1 = "From: " . $name . "\n\n" . "Contact number: " . $number . "\n\n" . "postcode: " . $postcode . "\n\n" . "email: " . $email . "\n\n" . "Message: " . $message; $from = "From: " . $_POST['f_name']; ini_set("sendmail_from", "myemail@.co.uk "); mail ( "myemail@.co.uk", $subject, $message1, $from ); header("Location: ../sent.php?name=" . $name .""); ?> Heres the Contact form <div id="contact_form"> <form action="mail.php" method="post"> <table width="" border="0" cellspacing="0" cellpadding="10"> <tr> <td class="contact-text">Full Name</td> <td><input name="f_name" type="text" class="contact_field" /></td> </tr> <tr> <td class="contact-text">Postcode</td> <td><input name="f_postcode" type="text" class="contact_field" /></td> </tr> <tr> <td class="contact-text">Email</td> <td><input name="f_email" type="text" class="contact_field" value="" /></td> </tr> <tr> <td class="contact-text">Phone Number</td> <td><input name="f_number" type="text" class="contact_field" value="" /></td> </tr> <tr> <td class="contact-text">Message</td> <td><textarea name="f_message" rows="6" class="contact_box"></textarea></td> </tr> <tr> <td></td> <td><input type="submit" class="send" value="Send" /></td> </tr> </table> </form> </div> the includes <?php include('includes/contact_form.php'); ?> and the css #contact_form { margin-top:0; margin-right:0; height:380px; width:465px; font: 18px Arial, Helvetica, sans-serif; } #contact_form tr { height: 15px; } .contact-text { width:140px; font-family: 16px/1.5em Arial, Helvetica, sans-serif; color:#fff; padding-top:0; } .contact_field { border: 1px solid #CCC; height: 30px; font: 14px/1.5em Arial, Helvetica, sans-serif; color: #333; padding: 5px; width: 270px; background-color:#fff; margin-top:0; margin-left:0; } .contact_box { border: 1px solid #CCC; height: 100px; font: 16px/1.5em Arial, Helvetica, sans-serif; color: #333; padding: 0; margin-top: 0; margin-left:0; width:280px; background-color:#fff; } .send { margin-top:-20px; margin-right:0px; height:25px; color:#000; font: 14px/1.5em Arial, Helvetica, sans-serif; float:right; background-color:#fff; background-color: rgba(255, 255, 255, 1); border:3px solid rgba(255, 255, 255, 0.5); border-bottom-left-radius:7px; -moz-border-radius-bottomleft:7px; border-bottom-right-radius:7px; -moz-border-radius-bottomright:7px; } Any help would be reeeeealy appreciated. thanks
August 31, 201115 yr not sure what the issue is with the code as such, but your contact form is open to abuse from spammers since you don't filter any of your data at all
August 31, 201115 yr Author Im putting that in Later on. Im new to php so at the moment just getting it working would be a milestone
August 31, 201115 yr Author Right, i took out the css and its still not working. does it have something to do with my php includes line in my html?
August 31, 201115 yr Author Well i am i aren't. this is a link to the basic contact_form.php and mail.php files http://www.ko-graphics.co.uk/rmt/includes/contact_form.php simple contact form. if you fill that in i will recieve it, i can guarantee you lol. and no error shows up. this link which has a php line - <?php include('includes/contact_form.php'); ?> - to include it on the contact page. You fill the form in on the contact page you get error 404 i just dont understand it. unless there is something wrong on the includes line.
September 3, 201115 yr I don't understand what's wrong neither page seems to be actually submitting data. Or it just doesn't tell me that it has submitted. Wanna post some source code?
Create an account or sign in to comment