Jump to content


Photo

redirect code help!


  • Please log in to reply
3 replies to this topic

#1 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 01 October 2006 - 07:45 AM

I have iths code thats supposed to redirect from

http://zycoworld.com...p?user=USERNAME
==>
http://zycoworld.com/USERNAME


heres my index.php code::
<meta http-equiv="refresh" content="0;url=http://zycoworld.com/<?php $_GET['user'] ?>">

it deosnt work. it just redirects to my zycoworld.com/index.php page
Link shortener with advanced, detailed statistics:

http://tyny.us/

#2 JasonLewis

JasonLewis
  • Members
  • PipPipPip
  • Advanced Member
  • 3,351 posts
  • LocationVictoria, Australia

Posted 01 October 2006 - 08:38 AM

try this:
<meta http-equiv="refresh" content="0;url=http://zycoworld.com/<?php echo $_GET['user']; ?>">

you didnt echo it. so its just a blank php code pretty much.

Good luck with your coding.
Jason / ProjectFear / Jaysonic

#3 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 01 October 2006 - 09:05 AM

<?php
header("Location: http://zycoworld.com/{$_GET['user']}");
?>

is better.

#4 JasonLewis

JasonLewis
  • Members
  • PipPipPip
  • Advanced Member
  • 3,351 posts
  • LocationVictoria, Australia

Posted 01 October 2006 - 09:06 AM

only because it re-directs without loading the page first. depends what he wants, but that is better.
Good luck with your coding.
Jason / ProjectFear / Jaysonic




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users