Passing variables from flash to php........???

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
BizNuge
Forum Newbie
Posts: 3
Joined: Sun Nov 21, 2004 6:46 pm
Location: Newcastle (UK)

Passing variables from flash to php........???

Post by BizNuge »

I'm new to PHP, but have just realised that I need a method of passing string variables from Flash MX 2004 into a PHP script running off a PHP enabled server I just rented.

The problem is that using the mail() function in PHP doesn't seem to work at all. So I can't check if the parameter pass has even worked at all. I have in a previous design tested this passing with the Get() function but once again was baffled by the fact that it did not work.

Here is the ActionScript that I have placed on a button in the Flash:-

Code: Select all

on (release)
{
	name="Thanks for the contact";
   loadVariablesNum("phpflash.php", 0, "POST");
}
And here is the PHP script "phpflash.php" that I am calling from the Flash object:-

Code: Select all

<?php
$email_from = "Biznuge Designs"; 
$email_subject = "Thanks for the contact"; 
$email_txt = "$name"; 
$email_to = "biznuge@biznuge.co.uk"; 
$headers = "From: BizNuge designs";
$ok = mail($email_to, $email_subject, $email_txt, $headers);
?>
I am quite new to PHP scripting but have been able to piece this together from a couple of different sources.

I have also visited http://uk2.php.net/manual/en/ref.mail.php and think I have set the SMTP setting and so on, but have only changed these settings in my system32 folder.

Any help with this would be useful, but please bear in mind that I am a first class beginner at this. I understand the principle behind this parameter passing, but that is all... :?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

search these forums... been dicussed several times

search.php?mode=results
Post Reply