Copy link to clipboard
Copied
I have created a form in DreamweaverMX 2004 and then tied it to mySQL database so that on submit the data posts to the database.
This works fine. It also goes to a "success" page just fine. I then added in some php code to also email a few of the fields from the form to a specific email address. This functions correctly using this code below (the email does go - the "from" email address has my login for MySQL database) EXCEPT that the data from the fields does not come through. The field labels are there as indicated below and the email is formatted correctly, but the data doesn't come through.
mail( $to = "emailaddress@mailto.com", $subject = "Someone has submitted an application",
$content= "Essay 1: ".$Essay1."\r\n"
."Essay 2: ".$Essay2."\r\n"
."Essay 3: ".$Essay3."\r\n"
."Essay 4: ".$Essay4."\r\n"
."Essay 5: ".$Essay5."\r\n");
What am I doing wrong?
That's problem #1 - then problem #2 is that I actually also need to send the ID code in this email for the specific record which has been created in my database so the end recipient can associate the email with that specific ID later for other purposes. So even if I figure out problem #1, I'm not sure that I can use this code for problem #2 because the field isn't on the html form, but actually created by the database upon submission.
Any suggestions would be helpful!
Thanks
Copy link to clipboard
Copied
Moved to the Dreamweaver Application Development forum, which deals with PHP and other server-side issues.