Jump to content


Photo

print urlencode not working - any fixes/alternatives?


  • Please log in to reply
2 replies to this topic

#1 j1mm1nycr1cket

j1mm1nycr1cket
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 31 August 2006 - 12:11 PM

Hello All,
I am sending a value from an <a href> to a php page containing a Flash movie. The link simply says <a href="mypage.php?label=what">
In mypage.php, all I want to do is read the value from the querystring and append it to the tag as follows:
<param name="movie" value="mymovie.swf?label=<?php print urlencode($label); ?>">
This works perfectly under php 4.4.2 where I tested it, but on the hosting server (where they are running php 4.3.8 ), nothing gets printed into the page at all.
I've run a 'hello world' so I know my php is getting executed, but this is baffling.
Is there something I can do to make it work?
Perhaps there's something not 'switched on' in the hosting environment that I need..?
Thanks in advance
Jimmy

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 31 August 2006 - 12:14 PM

=<?php echo $_GET['label']; ?>">

follow me on twitter @PHPsycho

#3 j1mm1nycr1cket

j1mm1nycr1cket
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 31 August 2006 - 12:21 PM

Goodness me, that was quick.
It works a treat. Thank you very much.  :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users