SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    nj
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    response.redirect in php

    im looking for a similar function to response.redirect in php.

    ive searched and found a way using the header: location bit but i get errors if it is not the first line of the code. a meta refresh is out of the question.

    this is the background:
    i have a form for a user to fill out. then it goes to the register script page which checks the validity of each form, and if everything is okay, it opens the database, adds the user, then closes. if there is an error, i want it to redirect to the previous page with page.php?error=#. that page then reads that and displays the error number on top.
    http://www.garagepages.com - The Garage Sale Search Engine. Locate a garage sale nearest you

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    nj
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    actually figured it out. turns out that i was trying to display the header.php before redirecting. now i moved the include below the code and it works.
    http://www.garagepages.com - The Garage Sale Search Engine. Locate a garage sale nearest you

  3. #3
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Moved to a more appropriate forum

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature


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
  •