I'm very new to php and trying to build a redirect which uses parameters from a URL which will differ from person to person.
The URL a person will access looks like: www.website1.com/redirect.php?p=p123&r=4&s=567
The p, r, and s will change for each person
I then want to redirect them to some other site that looks like this:
www.website2.com/p123.aspx?r=4&s=567
Here is what I have so far, but it's giving me an error "Cannot modify header information - headers already sent by ..."
<html>
<?php
$fpvalue = $_GET['p'];
$frvalue = $_GET['r'];
$fsvalue = $_GET['s'];
header("Location: http://website2.com/".$fpvalue.".aspx?r=".$frvalue."&s=".$fsvalue);
?>
</html>
I would really appreciate the help for a beginner.
Thanks!