• 0

Please review/fix my PHP


Question

I'm re writing my question.

In PHP, I've got

print "_root.holder.Status=\n Copy the following link to view your card:\n http://www.mywebsite-example.net/SelectCard.php?EcardText=$CreateEcard&ENum=$EcardNum\n\n-----------------------------------"; 
?>

This code displays a text link in a dynamic text on my flash movie.

My problem is this, where it says $CreateEcard&Enum=etc... the & disappears when it displays in the dynamic text in the flash.

I've tried &amp, \n&\n etc... just really need that & to appear, but php is treating it like a code and I don't want it to.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

print "_root.holder.Status=\n Cfopy the following link to view your card:\n http://www.mywebsite-example.net/SelectCard.php?EcardText=$CreateEcard&ENum=$EcardNum\n\n-----------------------------------"; 
?>

I could be wrong with this, but try replacing that line with the one below.

print "_root.holder.Status=\n Copy the following link to view your card:\n http://www.mywebsite-example.net/SelectCard.php?EcardText=".$CreateEcard."&ENum=".$EcardNum."\n\n-----------------------------------"; 

I'm not sure if it will work or not, it's just something I would try. If it doesn't work I'm sure someone else will be along to help soon enough.

Joe

Link to comment
Share on other sites

  • 0

Hi Joe. Thanks for your reply. Unfortunately it didn't work too :(

I will add though, it does "appear correctly" when it arrives via e-mail. I'm not sure why a dynamic text in flash would be any different. Do you suppose that it just isn't supported?

Link to comment
Share on other sites

  • 0

I don't think your problem is with PHP, the ampersand is output fine. It would be the Flash butchering it. Try this.

print "_root.holder.Status=\n Copy the following link to view your card:\n http://www.mywebsite-example.net/SelectCard.php?EcardText=$CreateEcard%26ENum=$EcardNum\n\n-----------------------------------";

You can also use the PHP function urlencode() instead of encoding the string manually as I did.

Link to comment
Share on other sites

  • 0

I don't think your problem is with PHP, the ampersand is output fine. It would be the Flash butchering it. Try this.

print "_root.holder.Status=\n Copy the following link to view your card:\n http://www.mywebsite-example.net/SelectCard.php?EcardText=$CreateEcard%26ENum=$EcardNum\n\n-----------------------------------";

You can also use the PHP function urlencode() instead of encoding the string manually as I did.

OOHo oooooOOHH!!! YOU DID IT! Thank you a million times over!!! You get a free hugclub t-shirt, as comes from my upcoming website. Just, when the website opens I'll contact you and you can take your pick.

http://www.hugclub.net

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.