Jump to content

Recommended Posts

After a form gets processed I want to use a header to return to the original page containing a list of records, AND remember the sort order of that page AND return to the correct part of the page where the user originally clicked to edit that record!

 

However, when it returns to the list it is NOT sorted and it does NOT go to the #original marker in <a href>.

 

Here is the part where I want them to return:

<a id="foo<?php echo $row['id_incr'];?>" href="editpatient.php?action=edit&tosort=<?php echo $_GET['column_name'];?>&id=<?php
 echo $row['id_incr']; ?>"> <?php echo $row['lname'];
	if ($row['fname'] !==''){
	echo ", ";
	}
echo $row['fname'];?> </a>

ignore the if/else stuff.

 

After the form is processed it returns to the list.

Here is the output address I see in the browser.  It does not return to the original record (in this example record 19):

http://localhost/tx/displayactive.php#foo19?column_name=mrn desc

 

Here is the code for that:

header("Location: displayactive.php#foo".$id_incr."?column_name=".$tosort);

 

I'm sorry if this is not clear. Please let me know if I need to clarify anything or show extra 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.