redirection after action

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
setnaps
Forum Newbie
Posts: 1
Joined: Tue Jan 04, 2011 3:30 am

redirection after action

Post by setnaps »

Good morning.
I'm working on my wordpress site http://www.victorenrich.com
I have a registration form at http://www.victorenrich.com/desktop-thumbnails
After clicking "register", it goes to thehttp://www.victorenrich.com/wp-login.php wordpress page which I don't want. I want to redirect to http://www.victorenrich.com/notification

The php code in this action is

Code: Select all

<form class="registerform" name="registerform" id="registerform" action="<?php echo site_url('wp-login.php?action=register', 'login_post')?>" method="post">
Could anybody please tell me how to add a redirection after the register action?

Thank you very much
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: redirection after action

Post by Jade »

You need to modify the login script so after it verifies the person has the correct credentials and sets up their session it redirects them using:

Code: Select all

header("Location: http://www.victorenrich.com/notification");
exit;
Post Reply