Jump to content

My echo script isn't working! Please help!


Jeanine_F

Recommended Posts

I hope someone can help me - I've been struggling for hours!

 

I built an input form in Flash (mx 2004) and wrote a php file with variables and echo commands:

 

The php displays the .swf e-card on my website, but the text is not there, only the quote displays (it doesnt run!)

 

This is what I did:

Please tell me what I did wrong?

 

<html><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width=550 height=400>

<param name=movie value="3008.swf?from=<?php echo $from; ?>&to=<?php echo $to; ?>&message=<?php echo $message; ?> ">

<param name=quality value=high>

<param name=bgcolor value=#FFFFFF>

<embed src="3008_form.swf?from=<?php echo $from; ?>&to=<?php echo $to; ?>&message=<?php echo $message; ?> " quality=high bgcolor=#FFFFFF width=550 height=400 type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</embed> </object>

 

Link to comment
Share on other sites

Can you show us the output source from your browser.. It might help shed a little more light..

 

And you havent missed the '<' on the PHP, it has been converted into its character entity.. This could be in your code or something that has happened when you copied it onto the forum. Seeing the source will help..

Link to comment
Share on other sites

Hi GFX

 

Thanks! I fixed it, but it's still not working. To answer your question - The viarables are called "to", "from"ect in the flash form and the values in the output .swf is the same. (is that a problem?) this is supposed to be an e-card where you can record a message and it is posted to my site) I actually want the e-card to be mailed to someone, but I havent even gotten to the point of figuring that out!!

 

The code is now:

 

<html><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width=550 height=400>

<param name=movie value="3008.swf?from=<?php echo $from; ?>&to=<<?php echo $to; ?>&message=<<?php echo $message; ?> ">

<param name=quality value=high>

<param name=bgcolor value=#FFFFFF>

<embed src="3008_form.swf?from=<?php echo $from; ?>&to=<<?php echo $to; ?>&message=<<?php echo $message; ?> " quality=high bgcolor=#FFFFFF width=550 height=400 type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</embed> </object>

Link to comment
Share on other sites

The way you have your code structured will allow you to pass IN variables to flash from PHP..

If $to, $from and $message arent defined in the PHP they will not be passed into your flash form..

 

I think you are wanting to send things FROM flash to PHP? Correct?

Link to comment
Share on other sites

Correctísh...

 

I have 3 files

3008_form.swf  (first file where I made input text boxes in Flash), this pops up and the user enters details (to, from and message)

then

3008.php (the code that I pasted above)

From this file I want to send the answers to the above 3 questions to another Flash file:

3008.swf (where I created dynamic text boxes in Flash.) that is the file that is visible on the link I posted

Link to comment
Share on other sites

you must first tell the php to get the values for variables that sent from flash form

 

and then echo them

 

$mesage $to  etc. are undefined variables

 

example:

<?php

//using POST Method
$message = $_POST["message"]; //"message" is the name that u set for input field in flash form

echo $message;

?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.