Jump to content

New guy with a question


lemorris

Recommended Posts

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.php


In 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



Link to comment
https://forums.phpfreaks.com/topic/35824-new-guy-with-a-question/
Share on other sites

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]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.