Jump to content


Photo

header()


  • Please log in to reply
2 replies to this topic

#1 pitn

pitn
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 25 April 2006 - 08:35 PM

(how) can i send a variable (ex: $Date) using header()?


header ('Location: [a href=\"http://xxx');\" target=\"_blank\"]http://xxx');[/a] /* can $Date be send using header?1


Tx all for a reply

#2 Darkness Soul

Darkness Soul
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts
  • LocationBrazil; São Paulo.

Posted 25 April 2006 - 08:52 PM

Be sure you can.. enjoy!

D.Soul

<?php
    // destination?
    $location = 'index.php';
    // as you wish..
    header ( "location:". $location );
?>

(If something is wrong, please tell me. I'm learning this language. Thank you)

#3 sanfly

sanfly
  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationNew Zealand

Posted 25 April 2006 - 08:57 PM

[!--quoteo(post=368609:date=Apr 26 2006, 08:35 AM:name=pitn)--][div class=\'quotetop\']QUOTE(pitn @ Apr 26 2006, 08:35 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
(how) can i send a variable (ex: $Date) using header()?
header ('Location: [a href=\"http://xxx');\" target=\"_blank\"]http://xxx');[/a] /* can $Date be send using header?1
Tx all for a reply
[/quote]

I think something like this:

header('Location: mypage.php?date=$date');

then to retrieve the variable on the location page

$date = $_GET['date'];

If you're not part of the solution, you're part of the precipitate




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users