Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting url of the page

Status
Not open for further replies.

zxcdf5je

Programmer
Apr 1, 2005
86
US
hi there,
I have this page which lists all the users name and they can be edited deleted and updated.The page which does that is 2.php and the page which actually lists all the users is 1.php.
when i delete a particular user by using 2.php ,after delteing the users name it redirects me to the first page of 1.php and i again have to go do 28th page to proceed ahead with other users..is there any way i could catch that page number /page and make the user return to the page from where they came from?

Hope u are understanding what i want..
help needed..pleaseeeee

-Smita
 
How are you doing your pagination in 1.php?
It is just a question of preserving that value through the run of 2.php.
So how did you do it in 1.php?

Options:
1. Session variables
2. hidden field

It might be as easy as to append the offset parameter to the header directive that redirects to 1.php

Another option is to execute 2.php through 'including' the code conditionally in 1.php
 
Thanks for the reply DRJ478..i really appreciate it..

Well the 1.php has this code which makes the url come on the browser:
'-------------------------------
' list Navigation begin
'-------------------------------
bEof = rs.eof
if not(rs.EOF and iPage=1) then
if iPage = 1 then
%>
<font style="font-size: 10pt; color: #000000; font-weight: bold; font-family: Arial, Tahoma, Verdana, Helvetica">Previous</font>
<%
else
%>
<a href="<%=file_name%>?<%=form_params%><%=sSortParams%>Formlist_Page=<%=iPage - 1%>#list"><font style="font-size: 10pt; color: #000000; font-weight: bold; font-family: Arial, Tahoma, Verdana, Helvetica">Previous</font></a>
<%
end if
response.write "&nbsp;[&nbsp;" & iPage & "&nbsp;]&nbsp;"

if bEof then
%>
<font style="font-size: 10pt; color: #000000; font-weight: bold; font-family: Arial, Tahoma, Verdana, Helvetica">Next</font>
<%
else
%>
<a href="<%=file_name%>?<%=form_params%><%=sSortParams%>Formlist_Page=<%=iPage + 1%>#list"><font style="font-size: 10pt; color: #000000; font-weight: bold; font-family: Arial, Tahoma, Verdana, Helvetica">Next</font></a>
<%
end if
end if
'-------------------------------
' list Navigation end
'-------------------------------

and in 2.php ..it simply points it to this page to 1.php by doing this way:
sActionFileName="1.php"
i dont know much abt php..so if you could be a bit descriptive that would help!!!

Thanks,
Smita
 
What you posted is NOT PHP.

Please post any PHP code you have.

Ken
 
oopss its an asp code..not php..sorry abt this..i have put the same question in the asp forum..but incase u still know the answer..please do reply..
thanks so much for the help
-Smita
 
Don't cross-post. What made you think people who specialize in PHP would know an answer regarding ASP? Anyway, when you send the user from 1.php to 2.php, you need to include FormList_Page=iPage in the url, in 2.php read this value and when redirecting back just use it.
 
No some forums are strict in the posting thingi..if its an php forum they just want php stuff...sorry abt that though...
how shud i read this value in 2.php and redirect it back to use??
dint get it
??
 
What if i include 1.php file in 2.php by
<%-->include file=1.php%>
and then where the variable which was set to be pointed to go to 1.php i set something like this:
sActionField="<%=file_name%>?<%=form_params%><%=sSortParams%>Formlist_Page=iPage%>#list"

Do u think this would work?

-Smita
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top