This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » PHP » Go back one page after DB Update
Reply

Go back one page after DB Update

Andrew Smith
Member



Since: 08 Sep 2004
Posts: 6
Posted 20 Oct 2009 20:57:15

Hi,

I have a list that is generated when the user logs in, i.e. he gets the list from the database.

Clicking a hyperlink send the user to the details of that paticular row.

When the user has finished with the form there is an update to the database, after this I want the screen to drop back one page to the first list.

Kind of like $updateGoTo = "javascript:history.back()";

Can this be done, and if anyone can help that would be great.

Thanks

Andrew

Hi,

I have a list that is generated when the user logs in, i.e. he gets the list from the database.

Clicking a hyperlink send the user to the details of that paticular row.

When the user has finished with the form there is an update to the database, after this I want the screen to drop back one page to the first list.

Kind of like $updateGoTo = "javascript:history.back()";

Can this be done, and if anyone can help that would be great.

Thanks

Andrew
Patrick Julicher
Official Representative



Since: 04 Feb 2002
Posts: 1,208
Replied 21 Oct 2009 16:33:30
Hi Andrew,

Maybe I don't understand correctly, but when using the Standard DW update behavior, you can set a redirect page......

Kind regards, Patrick
Andrew Smith
Member



Since: 08 Sep 2004
Posts: 6
Replied 21 Oct 2009 17:25:49
Hi ,

Yes you can, however, if i direct it back to the page for example test.php, it goes back to the begining of the page i want it to go back to the middle or bottom, just like using the back button, the update must happen so i need to do a back after the update

Thanks

Andrew
Patrick Julicher
Official Representative



Since: 04 Feb 2002
Posts: 1,208
Replied 21 Oct 2009 20:21:57
Hi Andrew,

Couldn't you create an anchor for each row, and after doing the update, redirect back to the page including the anchor?

Kind regards, Patrick
Andrew Smith
Member



Since: 08 Sep 2004
Posts: 6
Replied 22 Oct 2009 12:27:15
That sounds like a solution, can you set an anchor in a repeated region at each row?

Sorry about all the questions I am new to this

Thanks

Andrew
Patrick Julicher
Official Representative



Since: 04 Feb 2002
Posts: 1,208
Replied 22 Oct 2009 15:10:09
Hi Andrew,

Yes you can. Just insert the anchor code in the repeated region and set it's value to a database value.

Kind regards, Patrick
Andrew Smith
Member



Since: 08 Sep 2004
Posts: 6
Replied 27 Oct 2009 18:54:27
Thnaks for that,
I have got the anchour in place and that works,

but when I add
$updateGoTo = "www.oasdb.net/oas.php#<?php echo $row_rsReportTemp['SampleNumber']; ?>";

I get a whitespace error, and if i add an anchor manually, it does not work when it returns because I get oas.php#anchor?recordID=455555.

When I delete the end recordID bit it jumps down the page.

So 2 questions really.

1. How do I add a database anchor reference after update
and
2. clear the recordID from the url.

sorry for all the questions

Regards

Andrew

Reply to this topic

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency