SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2007
    Posts
    318
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Redirecting to previous page using php

    I want to redirect the user to the previous page, after the processing of the form is successful.

    Apart from using meta redirect and java go.back is this possible with php
    I don't think i can use header (location mysite/pages.php?a=1&b=2) as it would be a dynamic link .or can i

    from current process.php i want to send the user to previous page which is of the format mysite/pages.php?a=1&b=2 (has 2-3 GET parts)

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2003
    Location
    Barbados
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes you can use header redirects.

    Get the location you want to redirect to using $_SERVER variables which you can read up about here: http://php.net/reserved.variables

    Click here to see how to use php's header function: http://php.net/header


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •