Jump to content

Help with Small Change to PHP code


kma9000

Recommended Posts

Hello,

 

I have this peice of code on my index.php page:

 

<a href=\"\" onClick=\"return popitup('/download.php?name=".urlencode(trim($strippedsongname))."&file=".urlencode($id)."')\">download</a>

 

I am trying to get it to work on another php page however it won't. I am sure the answer is something simple and to do with the <a href=\"\" section. Allit is supposed to do is link to the specified song.

 

I hope you can help, sorry I know nothing about php, despite trying to learn.

Link to comment
https://forums.phpfreaks.com/topic/122085-help-with-small-change-to-php-code/
Share on other sites

Ok, the easiest way to explain is to show you what I mean. I hope it's ok to put URL's in this forum.

 

If you look at this page (as an example): http://www.mp3evolved.com/index.php?search=Madonna+-+Like+A+Prayer&type=audio - See where it says download / liten and Share and the links work?

 

Well I would like them to work on this page http://www.mp3evolved.com/lyrics.php?name=Madonna+-+%3Cb%3ELike%3C%2Fb%3E+%3Cb%3EA%3C%2Fb%3E+%3Cb%3EPrayer%3C%2Fb%3E&id=63184 - The same links are underneath the pictures.

 

Hope this helps.

I am still struggling to get this to workso in an effort for guidence this is the full code for the 2 links:

 

<span class=\"gotcha\"><a href=\"\"  onClick=\"return popitup('/download.php?name=".urlencode(trim($strippedsongname))."&file=".urlencode($id)."')\">download</a> |  <a href=\"\"  onClick=\"return popitup('/listen.php?name=".urlencode(trim($strippedsongname))."&file=".urlencode($id)."')\" title=\"Suggest it to friend\">Listen and Share it!</a></span>

 

On the first page, the URL is formatted correctly as such: /index.php?search=My+Chemical+Romance+cancer&type=audio

 

On the second page, after copying the above code exactly the URL is formatted as such: /\"\"

 

What do I need to do to get the code right?

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.