Jump to content

Passing a variable through a Flash Button in PHP


mark110384

Recommended Posts

Hi everyone I have a flash button that I want to use to replace the button "addtotrolley.bmp" in the following code.

 

<tr>

        <td><? echo "<a href='addcart.php?item_selected=$itemid'><img src = 'addtotrolley.bmp' border = '0'/></a>"?> </td>

      </tr>

 

As u can see I pass the a variable named $itemid, would anyone know how I would do this? What would  I put in the actionscript to take it to the addcart.php page with the appropriate variable. Any suggestion will be appreciated. Thanks in advance.

So far I have this jsut not sure how to direct to the page and pass the variable

 

 

<tr>

        <td><? echo "<a href='addcart.php?item_selected=$itemid'><embed src = 'addcartbutton.swf' width='9 0' height='50'</embed></a>"?> </td>

      </tr>

I have this for the php now, it takes the user to the url but it doesn't send the variable

 

        <tr>

        <td><? echo "<embed src='addcartbutton.swf?item_selected=$itemid' width='90' height='50'>";?></td>

      </tr>

 

The following is the actionscript

 

on (release){

getURL("addcart.php");

}

 

I think its nearly there but I'm struggling with the variable problem.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.