Jump to content


Photo

**solved** How do I put a variable into a header?


  • Please log in to reply
3 replies to this topic

#1 laide234

laide234
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 14 September 2006 - 11:55 AM

I have a variable $job_id that contains a numeric value I would like to append to a header.
i.e. if  $job_id = 5
go to  listing.php?view=thanks&job_id=5

Here is what I tried

header('Location: listing.php?view=thanks&job_id='echo $job_id;'');

Apperently, this isnt working. Any suggestions?

#2 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 14 September 2006 - 11:58 AM

<?php

header('Location: listing.php?view=thanks&job_id=' . $job_id);

?>


#3 laide234

laide234
  • Members
  • PipPipPip
  • Advanced Member
  • 33 posts

Posted 14 September 2006 - 12:00 PM

Thanks Jenk.

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 14 September 2006 - 12:12 PM

No probs.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users