Johnain Posted November 22, 2007 Share Posted November 22, 2007 can I do this? I want to pass a language value (EN/FR/DE etc.) from an Index HTML page to a PHP page with a language code in the call, so that the PHP page can select texts in that language. I would like to to it from an unordered list item if possible by extending the link ... <li><a href="scripts/pricelist.php??????????????????>Pricelist</a></li> Link to comment https://forums.phpfreaks.com/topic/78425-solved-passing-a-parameter-from-an-html-page-to-a-php-page/ Share on other sites More sharing options...
Johnain Posted November 22, 2007 Author Share Posted November 22, 2007 can I do this? I want to pass a language value (EN/FR/DE etc.) from an Index HTML page to a PHP page with a language code in the call, so that the PHP page can select texts in that language. I would like to to it from an unordered list item if possible by extending the link ... <li><a href="scripts/pricelist.php>Pricelist</a></li> Sorry about the dodgy faces. I thought I was just putting question marks in. Link to comment https://forums.phpfreaks.com/topic/78425-solved-passing-a-parameter-from-an-html-page-to-a-php-page/#findComment-396856 Share on other sites More sharing options...
trq Posted November 22, 2007 Share Posted November 22, 2007 Of course... <li><a href="scripts/pricelist.php?lan=en>English Pricelist</a></li> <li><a href="scripts/pricelist.php?lan=fr>French Pricelist</a></li> pricelist.php <?php if (isset($_GET['lan'])) { switch ($_GET['lan']) { case 'en': // english list break; case 'fr': // french list break; } } ?> Link to comment https://forums.phpfreaks.com/topic/78425-solved-passing-a-parameter-from-an-html-page-to-a-php-page/#findComment-396859 Share on other sites More sharing options...
Johnain Posted November 22, 2007 Author Share Posted November 22, 2007 Of course... <li><a href="scripts/pricelist.php?lan=en>English Pricelist</a></li> <li><a href="scripts/pricelist.php?lan=fr>French Pricelist</a></li> pricelist.php <?php if (isset($_GET['lan'])) { switch ($_GET['lan']) { case 'en': // english list break; case 'fr': // french list break; } } ?> Thank you very much. It's a steep learning curve for me, but I am enjoying it. Regards John Link to comment https://forums.phpfreaks.com/topic/78425-solved-passing-a-parameter-from-an-html-page-to-a-php-page/#findComment-396865 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.