lemorris Posted January 26, 2007 Share Posted January 26, 2007 Hi all.First of all I am a complete PHP novice.I am trying to change the way a page on this site links to the previous or next page. There is a php based menu and when you click on a link in the menu, you lose your session ID.Here's an example of the page type.http://www.chircoestore.com/catalog/pb_1.phpIn the menu the links to the next page or a page are written like this:[code]"<a href=\"$partial_path"."_". $all_page . ".php\">[/code]Here's the link to next page section[code]//Create link to all the previus pages and put in prev-image. if ($all_page < $page_num) { print "<tep_href=\"$partial_path"."_". $all_page . ".php\"><img src=\"images/prev.gif\" alt=\"$all_page\" border=\"0\"></a>"; } [/code] I am told they need to be written in a form like this:[code]<?=tep_href_link('engtech_1.php')?>[/code]so that the visitors don't lose their basket.Can someone help me change this:[code]"<a href=\"$partial_path"."_". $all_page . ".php\">[/code]into this:[code]<?=tep_href_link('engtech_1.php')?>[/code]Thanks for your help.-Lemorris Quote Link to comment https://forums.phpfreaks.com/topic/35824-new-guy-with-a-question/ Share on other sites More sharing options...
wildteen88 Posted January 26, 2007 Share Posted January 26, 2007 You cant put PHP code in a string. I guess what needs to be done is change this:[code]print "<tep_href=\"$partial_path"."_". $all_page . ".php\"><img src=\"images/prev.gif\" alt=\"$all_page\" border=\"0\"></a>"; [/code]to this:[code]print tep_href_link('engtech_1.php');[/code] Quote Link to comment https://forums.phpfreaks.com/topic/35824-new-guy-with-a-question/#findComment-169911 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.