Jump to content

php echo - How to send variable in javascript url


leemo

Recommended Posts

I wonder if you can help me with my syntax. I'm quite new at PHP so be forgiving.

 

This is the Javascript URL I am using to open player.php but, of course the rest is a complete mish mash at a first attempt. I 'm not sure how to send the variable within the URL

 

<a href="javascript:popupWindow('player.php?$mp3filename=[%%GLOBAL_MidiDemoName%%]&title=[%%GLOBAL_ProductName%%]')">
<img src="%%GLOBAL_TPL_PATH%%/images/mp3demo.png" alt="MP3 Demo"></a>

 

I have the popup window working correctly to player.php and within that URL I need to send the variables, using php echo, I believe:

$mp3filename

$title

 

in this case I would like

 

$mp3filename = %%GLOBAL_MidiDemoName%%

$title = %%GLOBAL_ProductName%%

 

Sorry about the %%fieldname%% format, but thats how the code works!

 

I have the syntax to receive the the variables at player.php as:

 

<?php echo $mp3filename;?>
<?php echo $title;?>

 

I'm tying myself up in knots and just need a bit of help.

 

Thanks

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.