DarraghR Posted August 29, 2016 Share Posted August 29, 2016 Hi guys. I am very new to PHP and have little or no knowledge at the moment. Currently I have a live site but would like to add a email submit form that would send the users information to a certain email and number of emails. A file submit option would be handy too.I have tried a few pre made scripts and templates but just cant figure out how to make any of them work. I use Dreamweaver to code and manage my live site.Below is a picture of the message I am getting in Dreamweaver and a link to the script I am using.http://www.freecontactform.com/email_form.php Quote Link to comment Share on other sites More sharing options...
NotionCommotion Posted August 29, 2016 Share Posted August 29, 2016 For real simple, try something like the following. <?php if(!empty($_POST['subject']) || (!empty($_POST['message'])) ) { mail('youremail@example.com', $_POST['subject'], $_POST['message']); } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>ContactForm</title> </head> <body> <form method="post"> <input type="text" name="subject" /> <textarea rows="4" cols="50" name="message"></textarea> <button type="submit">Submit</button> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
maxxd Posted August 29, 2016 Share Posted August 29, 2016 Your DreamWeaver error message is telling that the site definition is incorrect. Go to Site > Manage Sites, select your site definition in the list, and click the edit button. You'll want to select the 'Servers' panel, select your server in that list, and click the edit button once again. There, update your server location, default path, username, and password, and click 'Test'. This will let you know whether or not the information you entered is valid and able to be used by DW. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.