Ok, I have this page on my site such as: http://www.site.com/dwnldguide.php I am selling a digital product on ebay, I then email them a link to download the product on my website. This is the link I give them: http://www.site.com/dwnldguide.php?ebayuser=accountname Where "accountname" is the ebay user's accountname that I manually put in there. The download page is pretty generic and simply just has a raw link to the downloadable product. All I want that PHP file (dwnldguide.php) to do is simply take that variable after the "?" and simply put it into the html page at a certain spot. Which the end result will look something like this: This product is registered to the "ebayuser=accountname" and any attempt at piracy will be monitored blah blah blah... Download the Product Here!.... thanks for the purchase... etc.. This is ONLY a scare tactic, just to make them not distribute the link to anyone. I know this is not 100% secure, but Im just using this as an extra measure. So can anybody make me this simple php script? Thanks for any help!!
if register globals is off solidphp's solution is very good. If globals are on it simply enough to write <? echo $ebayuser; ?> But it's recommended to use the first solution
more secure: <?php (isset($_GET['ebayuser']) && $_GET['ebayuser'] !== '') ? echo trim(preg_replace("/[^\x20-\xFF]/",'', $_GET['ebayuser'])) : echo 'undefined'; ?> Code (markup):