meltingpoint Posted August 24, 2012 Share Posted August 24, 2012 I am trying to dynamically display an embeded pdf on a page with a variable that is passed via the $_GET method link- http://www.mysite.com/pdf_display_page.php?pdf=Whatever.pdf <embed src="http://www.mysite.com/reviews/<?php echo $pdf;?>" width="585px" height="400px"> It does not work. Testing the $_GET variable does show the Whatever.pdf Is it because of the double quotes somehow? Quote Link to comment https://forums.phpfreaks.com/topic/267535-variable-in-link/ Share on other sites More sharing options...
Psycho Posted August 24, 2012 Share Posted August 24, 2012 Well, you never defined $pdf, so it's not going to include the URL parameter in that string. You said the $_GET global is working - so I'm confused as to why you are not using that. Quote Link to comment https://forums.phpfreaks.com/topic/267535-variable-in-link/#findComment-1372178 Share on other sites More sharing options...
meltingpoint Posted August 24, 2012 Author Share Posted August 24, 2012 Actually- I did define the $pdf variable like so; $pdf = $_GET['pdf']; This is done at the very start of the page. So $pdf does infact echo out Whatever.pdf Quote Link to comment https://forums.phpfreaks.com/topic/267535-variable-in-link/#findComment-1372180 Share on other sites More sharing options...
requinix Posted August 24, 2012 Share Posted August 24, 2012 What does the actual HTML source of the page look like? Quote Link to comment https://forums.phpfreaks.com/topic/267535-variable-in-link/#findComment-1372182 Share on other sites More sharing options...
meltingpoint Posted August 24, 2012 Author Share Posted August 24, 2012 Sorry all- I was coding it correctly- it was a problem with my WYSIWYG program. All fixed now. Quote Link to comment https://forums.phpfreaks.com/topic/267535-variable-in-link/#findComment-1372187 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.