Jump to content

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]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.