Change URL and pass variables
-
I need to redirect submit button with variables to new url. So far I figured out the variables part
global $mo, $yo; echo esc_url(add_query_arg( array( 'var1' => $mo, 'var2' => $yo ), home_url() ));
So result is http://www.example.com/?var1=$mo&var2=$yo
But now where my brain shuts down as I also need to change the path like:http://www.example.com/newpath/?var1=$mo&var2=$yo
Any suggestions how to achieve that?
Newbie I am
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Change URL and pass variables’ is closed to new replies.