herghost Posted January 27, 2008 Share Posted January 27, 2008 Hi all, I am slowly picking up php and am getting there! Thanks to all those who have helped me so far! I have a quick question, I shall try and explain it as best as I can! I am setting up a store where the customer can put a link to the amazon page of the item, I have a affiliates account so I basically want the link changed to my amazon affialtes link automatically, for example the amazon link for an 80gb ipod is: http://www.amazon.co.uk/Apple-iPod-classic-80GB-black/dp/B000UVS20Y/ref=pd_bbs_sr_1?ie=UTF8&s=gateway&qid=1201475249&sr=8-1 while the affiliate link is http://www.amazon.co.uk/dp/B000UVS20Y?tag=speciainvita-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=B000UVS20Y&adid=17MV5PBY277D9CQBV8WA& is there a way in php to do this? Currently the link is stored as $source and when displayed I am currently just using the echo command. Thanks for any help you can give, like I say, I am getting there but I do not understand everything at the moment! Quote Link to comment Share on other sites More sharing options...
herghost Posted January 27, 2008 Author Share Posted January 27, 2008 Thought this may explain how its saved better: when the item is entered this code is used: <input name="source" type="text" value="<?php echo htmlspecialchars(stripslashes($source)); ?>" maxlength="255" size="50"/> and when viewed on another page this is how I have done it: <?php echo htmlspecialchars($row["source"]); ?> Quote Link to comment 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.