Hey,

Man... I know this is so easy and yet I can't get this to work. I have a url that I want to pass a simple variable with:

http://www.somerandomsite.com/index.php?page=1

Here's what I have on the destination page:

<?php $page=$_GET;?>


<?php header( 'Location: http://www.anotherrandom.com/?pid=$page') ;?>

However, the destination is not placing the "1" in the redirect. What am I doing wrong?

Thanks, everyone.

Jon

Recommended Answers

All 2 Replies

First of all don't do that. You don't have anything validating the data. This creates a problem.

Anyway, all you have to do is replace the ' with " in the header function.

Thanks for your help. What should I do instead in order to validate the information and have it run properly?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.