CBaZ Posted May 16, 2012 Share Posted May 16, 2012 I have been trying to figure out how this is done? One php file and all that changes is the name of the brand and the logo. This has to be clickable from a menu and also if a user changes the brand name it changes to the appropriate name and logo. Any ideas as to how this is done? If you can guide me in the right direction or give me an example of how this is done would be greatly appreciated. Thanks. http://www.drivermanager.com/en/download-confirmation.php?brand=compaq&logo= Quote Link to comment https://forums.phpfreaks.com/topic/262625-how-is-this-linking-process-done-please-help/ Share on other sites More sharing options...
ignace Posted May 16, 2012 Share Posted May 16, 2012 Just change the src="" of the <img/> and point it to the new location (you may need to append something like ?_=Math.rand() to the image filename for it to work). Quote Link to comment https://forums.phpfreaks.com/topic/262625-how-is-this-linking-process-done-please-help/#findComment-1346019 Share on other sites More sharing options...
CBaZ Posted May 16, 2012 Author Share Posted May 16, 2012 so the math random will also do the trick for not only the image but the text. will I need to make use of the $get command? or how will I be able to generate the sample.php?brand=xx Quote Link to comment https://forums.phpfreaks.com/topic/262625-how-is-this-linking-process-done-please-help/#findComment-1346029 Share on other sites More sharing options...
ignace Posted May 16, 2012 Share Posted May 16, 2012 The Egg of Columbus: http://jsfiddle.net/BJ9XP/2/ Quote Link to comment https://forums.phpfreaks.com/topic/262625-how-is-this-linking-process-done-please-help/#findComment-1346058 Share on other sites More sharing options...
CBaZ Posted May 16, 2012 Author Share Posted May 16, 2012 ok this is part of what my script needs to accomplish only thing is it needs to do this without a pull down what changes is the .php?brand=compaq or brand = acer that filed changes the word inside the php in certain places and the logo images without pull down. Quote Link to comment https://forums.phpfreaks.com/topic/262625-how-is-this-linking-process-done-please-help/#findComment-1346126 Share on other sites More sharing options...
ignace Posted May 17, 2012 Share Posted May 17, 2012 Even simpler then: switch (strtolower($_GET['brand'])) { case 'compaq': echo '<img src=".." ..'; break; } Quote Link to comment https://forums.phpfreaks.com/topic/262625-how-is-this-linking-process-done-please-help/#findComment-1346254 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.