3 Replies Latest reply on Aug 22, 2006 1:40 PM by jdeline

    linking back to a query after action page

    brianism
      Wondering if anyone knows the best way to add a link on an action page that will take a user back to a completed query page. What I have is a query results page that allows to edit or delete, after the action of either edit or deleting I need to bring the user back to the first query page so they can edit or delete more if they wish.
      This sounds easy but I can't figure out how to do it. I am assuming I will need to pass the completed query information through to my action page so I can link back to it? Below is my code:

      -----------------------------------

      Query Page (finddate.cfm):

      <cfquery name="qstudents" datasource="ardexseminars">
      SELECT * FROM registrants WHERE seminardate = '#seminardate#' ORDER BY seminardate, seminar
      </cfquery>

      <form action="groupdelete.cfm" method="post">
      <cftable query = "qstudents"
      startRow = "1" colheaders colSpacing = "6" HTMLTable border="1" headerlines="2">
      <!--- each cfcol tag sets width of a column in table, and specifies header
      information and text/CFML with which to fill cell --->
      <cfcol header = "<c>Admin</c>"
      align = "Left"
      width = 25
      text = "<a href=editstudent.cfm?id=#id#>Edit</a> | <input type=checkbox name=remove value=#id#>Delete | <a href=viewsaved.cfm?letterid=#id#>View Saved</a>">

      <cfcol header = "<c>Seminar</c>"
      align = "Left"
      width = 25
      text = "#seminar#;#seminar_type#">

      <cfcol header = "<c>Seminar Date</c>"
      align = "Left"
      width = 25
      text = "#seminardate#">

      <cfcol header = "<c>Name</c>"
      align = "Left"
      width = 25
      text = "<a href=display.cfm?id=#id#>#name1#</a>">


      </cftable>
      <br>
      <center>
      <input type="submit" value="Delete Selected">
      </center>

      </form>

      -------------------------------
      Action Page (groupdelete.cfm)

      <cfquery name="delstudents" datasource="ardexseminars">
      DELETE FROM registrants WHERE id IN (#form.remove#)
      </cfquery>


      Registration info deleted

      <br><br>
      <A HREF="no idea what to put here..">Back</A>

      -----------

      That back link is where I need to bring them back to the query page (finddate.cfm).

      Thanks in advance for any help.