Hi, Please go to www.rockstahmedia.com and click the contact tab. There is a form over there, how do i make it like a working contact form? Please can someone help me out. Thanks!
Well for starters action="#" isn't going to go anywhere. You need to send the content somewhere, preferably a php page or other script that can take the form details and either email it to you or save it. It's generally not advised to use the mailto:youremail.com method as the action. By the way when you click on the link at the bottom of the site that says its valid xhtml... its not, has over 43 errors.
Thanks! I know that '#' is not going to work. Can you tell me what to do so that I can do something with PHP and mail it.
In a nutshell, and keep in mind this is completely minimal and unfurnished and does not take into consideration spam and form abuse, but would work, you can try this: Your form: <form action="send.php" method="post"> <img src="images/leave-a.gif" alt="Leave a message" /> <ul> <li><input type="text" class="text-name" name="contact_name"/></li> <li><input type="text" class="text-email" name="contact_email"/></li> <li><textarea class="message" rows="2" cols="25" name="the_message"></textarea></li> <li><input type="image" src="images/send.gif" class="submit" alt="submit" /></li></ul></form> Code (markup): send.php <? $name = $_POST['contact_name']; $email = $_POST['contact_email']; $message = $_POST['the_message']; mail('youremail@domain.com', '[SiteMail From '.$name.']', $message); //sends user back to site, could be modified to send them to a thank you page header('location:index.php'); ?> PHP: To go a step further would look into something like reCaptcha to prevent automated spams to your contact box, and using PHPMailer to send mail via SMTP if you need the message to come in a cleaner format (though the latter isn't as important if you're the only one getting the emails and your server supports sendmail)