Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

header('Refresh') Question

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
US
when using the refresh....is it possible to pass a variable in the url that you are passing?

I.e.
$a1='test';
header('Refresh: 5; URL=test2.php?var1=$a1');

i get to the next page but the var1 is empty.
 
It may be your use of quotes.

In this line:

header('Refresh: 5; URL=test2.php?var1=$a1');

You use a variable reference inside singlequotes. But variables are not interpolated inside singlequotes.



Want the best answers? Ask the best questions! TANSTAAFL!
 
got it....

header('Refresh: 5; URL=test2.php?va1='.$a1);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top