Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
234 views
in Technique[技术] by (71.8m points)

php - creating back page links in Codeigniter

I have a page with URL http://arslan/admin/category/index/0/name/asc/10 in Codeigniter. In this URL, the uri_segment start from 0. This (0) is the default search value, name and asc are the default sort field and order, and 10 is the pagination index.

Now if I move to an add page with URL (http://arslan/admin/category/add/) similarly like above "add" is the current function.

Now if i want to go back through a link to back page... How can I divert the user back? I can't make the URL go back.

Can somebody help me please?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I am not sure if i understand the question correctly, if not please ignore my answer, but I think you want a link to "go back to previous page", similar to the back-button in a web browser.

If so you could use javascript to solve this by simply using this line:

<a href="javascript:window.history.go(-1);">Go back</a>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...