Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2012
    Posts
    11
    Thanks
    4
    Thanked 1 Time in 1 Post

    redirecting after POST

    I'm working on a website and don't really know PHP

    http://seriesaddict.fr/The-Big-Bang-Theory/86/avis


    Basically, you can add a comment on the above link and I want to be able to add a comment from this page:

    http://seriesaddict.fr/The-Big-Bang-Theory/86
    and then redirect to
    http://seriesaddict.fr/The-Big-Bang-Theory/86/avis

    I've playing around with the function but can't figure out how to do it, here it is :
    Code:
    redacted
    Any help ?
    Last edited by mockingbird001; 11-03-2012 at 02:17 AM.

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    I'll admit, I just did a quick scan of the script...but it seems like you would need an adjustment to this line:

    PHP Code:
    header('Location: '.$_SERVER['REQUEST_URI']); 
    I suppose you would turn it into the following:

    PHP Code:
    header('Location: '.$_SERVER['REQUEST_URI'].'/avis'); 
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • Users who have thanked Rowsdower! for this post:

    mockingbird001 (11-03-2012)


  •  

    Posting Permissions

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