Hi Dave,
as I just created a form and PHP script for our Flash8Magic page, for everybody who's interested here's how I did it:
1. Create a page with text boxes and a submit button. (My example uses five text boxes.)
2. Make all text boxes editable text boxes in Interactive palette (object tab). Write down the names of the boxes.
3. For the button create an event "click up" that triggers an action "Internet > Submit Page", method POST, to the URL of my PHP script (e.g. "http://www.yourdomain.com/mailscript.php").
The sendmail PHP script looks like this, note that the red names are matching the names of the box names in QuarkXPress 8:
<?php
// Fields from SWF form post follow
$name = $_POST["name"];
$surname = $_POST["surname"];
$email = $_POST["email"];
$country = $_POST["country"];
$message = $_POST["message"];
// Definition of email that will be send follows
$to = 'yourname <yourname@yourdomain.com>';
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: yourname <yourname@yourdomain.com>' . "\r\n";
$headers .= 'Reply-To: yourmail@yourdomain.com' . "\r\n";
$subject = 'Your Subject';
$body = "
<html>
<body>
<p>Name: $name $surname</p>
<p>Email: $email</p>
<p>Country: $country</p>
<p>Message: $message</p>
</body>
</html>
";
// Mail command follows
mail($to, $subject, $body, $headers);
?>
4. Copy this script into a text editor and save as mailscript.php and upload to your server.
Done!
(Of course you need to adjust the blue fields. Also, my script was a bit more fancy, as I check for a valid email address and disable the button after submitting. If you are interested how I did that, please let me know.)
Now your Flash (SWF) file will pass the data entered into the SWF to the PHP script and send a mail via your server without any further user interaction or client-side mail program.
Enjoy!
Matthias
Matthias Günther
Senior Product Manager
Quark Software Inc.(Please note: As I am traveling and do not have access to the forums, I will not be able to respond to forum posts currently.)
Want to easily publish for the iPad, using high-fidelity designs with stunning interactivity? See here: English:
http://youtu.be/Gldk5lvXXTA French:
http://youtu.be/nsgB4Q7lQzg German:
http://youtu.be/lecdenqaUGY Italian:
http://youtu.be/wjBpYZsF-8s
Need immediate help? Please contact Quark's support:
http://support.quark.com/contact_us.html