How can I redirect after user action

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webandwe
    New Member
    • Oct 2006
    • 142

    How can I redirect after user action

    Hi

    I got a script that inserts data into a database, after the user presses submit I made it to echo a conformation.

    how can I change is so it goes to another URL

    [PHP]
    #confirm

    If ($rs) echo( "record added: $business_name" ) ;
    }

    I want to make it like

    #confirm

    If ($rs) goto( "www.domain.com ") ;
    }


    [/PHP]

    Let me know if you need the whole script...
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    You are going to want to use the header("Locatio n: "); call. Take a look at PHP's documentation of the header function.

    Originally posted by webandwe
    Hi

    I got a script that inserts data into a database, after the user presses submit I made it to echo a conformation.

    how can I change is so it goes to another URL

    [PHP]
    #confirm

    If ($rs) echo( "record added: $business_name" ) ;
    }

    I want to make it like

    #confirm

    If ($rs) goto( "www.domain.com ") ;
    }


    [/PHP]

    Let me know if you need the whole script...

    Comment

    Working...