jeff5656 Posted July 25, 2009 Share Posted July 25, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/167384-solved-display-by-column-and-use-a-marker/ Share on other sites More sharing options...
jeff5656 Posted July 25, 2009 Author Share Posted July 25, 2009 I figured it out. The # has to be at the end: header("Location: displayactive.php?column_name=".$tosort."#foo".$id_incr); Quote Link to comment https://forums.phpfreaks.com/topic/167384-solved-display-by-column-and-use-a-marker/#findComment-882599 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.