php coding - fix the previous page link

Posted on 2011-04-26
Last Modified: 2012-05-11
The current "back to" link goes to the parent category & not the previous page.
On this page:

Click on the Collage tile (3rd in 1st row) & see how the  "back to" link that takes you to the parent category & not the previous page.

Several of these posts belong to more than one category.  I want the "back to link" on this page to go to the previous page,  not the parent category that is sometimes one of 2 or 3 parent categories & not the previous page.

Can you show me how to edit the php file to fix this?

Thank you!

Attached is the current single_product.php file.

Question by:carolsanjose
    LVL 8

    Accepted Solution

    You can add this line in your code to go back one page..

    <a href="javascript:history.go(-1)" title="Return to the previous page">&laquo; Go back</a>

    The code in your file is correct to go to the parent category. I will keep both the links on the product page. So user can decide where to go.
    LVL 7

    Expert Comment

    by:Alicia St Rose
    I'm not directly answering your question but just wanted to suggest that you move your bottom menu with "View Cart" to the top of the page. Right now it's below the fold and not very user friendly. You could move it to the very top right of your header...

    The site looks great!

    Okay, now I'll bud out because I don't have the answer to your question.


    Author Closing Comment

    Thank you!!!

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    This video teaches users how to migrate an existing Wordpress website to a new domain.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now