Forum Moderators: coopster
I have a URL that looks like this
example.com/example/?w=keyword
Now... example.com/example/ only contains an index.php file with a header redirect. I want the header to grab ?w and append it to the end of the url.
Something like this (obviously this doesn't work because I am a PHP super noob)
<?php
$page = $_GET['w'];
$url = 'http://www.example.com/test/example.html&sub=$page';
header( 'Location: $url' ) ;
?>
Basically I want the header to redirect to
http://www.example.com/test/example.html&sub=keyword
Keyword being the variable.
I tried searching around but quickly got lost in 10x more complex looking problems.
Hope someone can help me here.
Thank you!
$url = "http://www.example.com/test/example.html&sub=$page";
More information on php strings here: [php.net...]